PDA

View Full Version : SSH to check TCP port 43


vps-vince
09-19-2007, 06:55 PM
Hi all,
Sorry for this lame question, but anyone tell how to use SSH to check if my server can communicate over TCP port 43 please?

Many thanks,

- Vince

Robert
09-19-2007, 07:14 PM
If you're on linux and want to SSH to a server listening on a different port, you can use:

ssh user@server -p PORT#

If you're wanting to check if your SSH is LISTENING on port 43, you can use:
netstat -plan | grep ssh | grep LISTEN

You should get something like:

[root@admin2 ~]# netstat -plan | grep ssh | grep LISTEN
tcp 0 0 :::PORT :::* LISTEN 8479/sshd

PORT would be the port that the SSH binary is listening on.


Hope that helps.

vps-vince
09-20-2007, 05:42 PM
Hi Robert,
Thanks for that.
Here is the result:

# netstat -plan | grep ssh | grep LISTEN
tcp 0 0 0.0.0.0:myPORT 0.0.0.0:* LISTEN 9566/sshd


Also given this command to try:

# telnet whois.crsnic.net 43
Trying 199.7.55.74...
Connected to whois.crsnic.net.
Escape character is '^]'.
Connection closed by foreign host.

Apparently, indications are we can connect to port 43
I would never have guessed that from those results. :confused:

Regards,

- Vince