SSH time out on login attempt from remote box: command needed to check port 22
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
SSH time out on login attempt from remote box: command needed to check port 22
I have set up a user to login remotely to our Red Hat 5 server via SSH. A rule in our department firewall enables this user to login from a single static ip address. The ssh port on our server is 22. I am able to login to port 22 from locations within our department firewall. Our administrator says the firewall configuration is unchanged.
The remote user had been successful logging in. But now the remote user gets a Connection Timed Out message, before being asked to authenticate by the server.
I regenerated security keys, but the remote user still gets the connection timed out message. (I can login locally with the new keys).
I suspect either a firewall or an authentication problem--inclining a firewall problem. Am I correct?
Is there a Linux command to check whether port 22 is available or blocked, prior even to authentication, for login from the user's remote location?
And, to round out your list of possible options, you can also scan with netcat:
Code:
$ nc -zvw 1 host_here 22
See the nc(1) manpages for details.
---
I'd add that in OP's case it would be useful to watch packets with tcpdump(8). Although each of the scanning tools mentioned technically demonstrates the same thing about tcp handshaking, it's a good idea to see what is happening on a lower level. (i.e. SYN sent but no SYN-ACK received?)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.