Search code examples
telnet

how to find the IPs of all the devices connected to a particular server via telnet?


There are several computers connecting to one machine via telnet.. I want to find out which are all the systems/IPs which are connected to the machine via telnet... is it possible to find that out?


Solution

  • The netstat program will tell you what connections are active. You just need to grep the output for those established and connected to the telnet daemon.

    sudo netstat --inet -p | grep "/telnetd" | grep ESTABLISHED
    

    (or something very close to that -- I don't have a running telnetd service on my machine to verify the command -- you may have to look at the output of netstat directly and adjust the grep strings)