When I tried to connect a remote server (say 'server A') through ssh, it continuously failed with no response and finally showed connection timeout.

The network connection situation is following.

I have several different servers with same first two digits in the ip address e.g. A.B.x.x (Here, A, B are same) in my local computer and servers.

The weird thing is that I can connect other servers including my local computer through ssh from 'server A', however, the opposite way is definitely impossible right now: SSH connection from any server to 'server A'.

I also checked port 22 is opened on 'server A', with netstat -tuplen.

What can I try to solve it or please comment anything we can see to realize what's the exact situation is.

  • Can you ping 'Server A' from the other computers (is there a route to it)? – steeldriver Jun 21 '17 at 2:06
  • 1
    You might want to check to make sure you have the proper netmask on your network as well. Also, are there multiple switches and such in place? Sometimes extra links of switch to switch can monkey with routing. – ben-Nabiy Derush Jun 21 '17 at 2:10
  • Also, can you try doing a verbose connection and see where it stalls? – ben-Nabiy Derush Jun 21 '17 at 2:11
  • @steeldriver when I ping 'Server A', the packets are transmitted and also they are received. It seems that the only problem is that the connection through 'ssh id@ServerA' doesn't work – Mark Yoon Jun 21 '17 at 3:37
  • I found that 'ssh id@ServerA' from 'Server A' itself succeeded – Mark Yoon Jun 21 '17 at 6:24

Try deleting your keys and reconnecting, they're stored in:


It worked for me when I had something similar sounding...

  • I cannot find ~/.ssh/authorized_keys – Mark Yoon Jun 21 '17 at 3:40
  • It's hidden directory (i.e. uses a . prefix), so you need to use ls -a to see it. If it's still not there something probably went wrong with ssh. – MDilmore Jun 21 '17 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.