Thursday, September 8, 2011

Telnet LAN Primer

Dialog of a telnet session on the LAN.

The Nodes:
Ubuntu Linux Box
MacBook OS X

The Protocol:
Telnet from the TCP/IP suite

Network Addresses:
Ubuntu on static IP 192.168.1.xx
MacBook on DHCP, currently assigned to 192.168.1.101

Prerequisites:
Available default port of 23
Client must be running Telnet daemon
  1. Test port 23 on MacBook from Ubuntu Terminal window using nmap:

  2. jason@thecube:/etc/bind$ nmap -p 23 192.168.1.101
    Starting Nmap 5.21 ( http://nmap.org ) at 2011-09-08 16:04 EDT
    Nmap scan report for 192.168.1.101
    Host is up (0.084s latency).
    PORT   STATE  SERVICE
    23/tcp closed telnet
    
    Nmap done: 1 IP address (1 host up) scanned in 0.27 seconds

    Port is closed because no Telent service is running. Run Telnet service on Mac:

    macbook:sudo launchctl load -w /System/Library/LaunchDaemons/telnet.plist
    
    
    Scan again:

    jason@thecube~$ /etc/bind$ nmap -p 23 192.168.1.101
    
    Starting Nmap 5.21 ( http://nmap.org ) at 2011-09-08 16:15 EDT
    Nmap scan report for 192.168.1.101
    Host is up (0.052s latency).
    PORT   STATE SERVICE
    23/tcp open  telnet
    
    Nmap done: 1 IP address (1 host up) scanned in 0.24 seconds

    Prerequisites met.

  3. Establish telnet connection:

  4. jason@thecube:~$ telnet 192.168.1.101
    Trying 192.168.1.101...
    Connected to 192.168.1.101.
    Escape character is '^]'.
    
    Darwin/BSD (macbook.local) (ttys001)
    
    login:mylogin
    password:
    Last login: Wed Jul 27 21:54:24 on console
    
    
  5. Success. Logout. End telnet connection.

  6. macbook:sudo launchctl unload -w /System/Library/LaunchDaemons/telnet.plist
    
A final word: Best not to use telnet as the data sent is unencrypted. Consider instead using SSH on a nonstandard port for comprehensive security.

No comments: