When NOT to use Telnet telnet > open -l ubuntu 10.0.3.234 > ls telnet 10.0.3.234 443 nmap 10.0.3.234 ======================= How Telnet works > CTRL+] > environ list > environ define stuff hello > environ list > send ayt > send getstatus > q telnet -X character 10.0.3.234 nano telnet-login.sh #!/bin/bash HOST='10.0.3.234' USER='ubuntu' PASSWD='ubuntu' CMD='ls' ( echo open "$HOST" sleep 2 echo "$USER" sleep 2 echo "$PASSWD" sleep 2 echo "$CMD" sleep 2 echo "exit" ) | telnet ./telnet-login.sh ------------- Telnet commands: NAME CODE MEANING SE 240 End of subnegotiation parameters. NOP 241 No operation. Data Mark 242 The data stream portion of a Synch. This should always be accompanied by a TCP Urgent notification. Break 243 NVT character BRK. Interrupt Process 244 The function IP. Abort output 245 The function AO. Are You There 246 The function AYT. Erase character 247 The function EC. Erase Line 248 The function EL. Go ahead 249 The GA signal. SB 250 Indicates that what follows is subnegotiation of the indicated option. WILL (option code) 251 Indicates the desire to begin performing, or confirmation that you are now performing, the indicated option. WON'T (option code) 252 Indicates the refusal to perform, or continue performing, the indicated option. DO (option code) 253 Indicates the request that the other party perform, or confirmation that you are expecting the other party to perform, the indicated option. DON'T (option code) 254 Indicates the demand that the other party stop performing, or confirmation that you are no longer expecting the other party to perform, the indicated option. IAC 255 Data Byte 255. =================== Troubleshooting Telnet Connections nmap 10.0.3.234 sudo nano /etc/services less /etc/inetd.conf telnet 10.0.3.234 2323 exit telnet -l fred 10.0.3.234 sudo nano /etc/xinetd.conf instances = unlimited exit Telnet Configuration Resources: /etc/inetd.conf /etc/xinetd.d/telnet /home/username/.telnetrc Windows registry: HKEY_LOCAL_MACHINE\Software\Microsoft\TelnetServer\1.0 Windows PowerShell: tlntadmn