AIXEnableTelnet

How to enable telnet on an AIX machine

Allow me to be very clear: if I am ever in charge of computer access in the future, anyone who is still using telnet on any operating system will be terminated with extreme prejudice. For Pete's sake, people, use SSH already! Sheesh...

Anyway, where I work, some people claim application XYZ does not work correctly with SSH (yeah right) and can you please activate telnet on this or that machine, pretty please? And it took me an hour to figure it out. So, here is how to do it:

1. Uncomment telnet in /etc/services and /etc/inetd.conf

WARNING Do not use smitty! It will only result in broken keyboards! ;-)

For instance, you should find the following entries in /etc/services:

bash-3.00$ grep -i ^telnet /etc/services
telnet                  23/tcp          # Telnet
telnet                  23/udp          # Telnet
telnets          992/tcp                # telnet protocol over TLS/SSL
telnets          992/udp                # telnet protocol over TLS/SSL
telnetcpcd              3696/tcp                # Telnet Com Port Control
telnetcpcd              3696/udp                # Telnet Com Port Control

Please note that there are something like 600 different kinds of telnet under AIX: I filtered the output as you can see above. IBM is nothing if not thorough. The one you want, of course, if the port 23 telnet.

The same should be true of the file /etc/inetd.conf: just uncomment the telnet line, port 23,and you are in business.

2. Restart inetd

Use one of the following commands as root - they are equivalent:

bash-3.00# refresh -s inetd
bash-3.00# ps -fe | grep -i inetd | grep -v grep | awk '{print $2}' | xargs kill -1

Inetd is now restarted and you should be able to connect to the machine using telnet. (The horror, the horror...)

Yeah, I know, this is fairly basic, but I spent way too much time trying to guess how to do it. So there you go.

See Also: