Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why is it that I can ssh into another server but when I tried to ssh but it goes into timeout and failed?

ubi@xserver: ssh lil@yserver
Password: 
Last login: Thu Jan 30 16:10:39 2014 from xserver
lil@yserver:~> ssh ubi@xserver
_

I've tried ssh with option -A but it's not working:

lil@yserver:~ # ssh -A ubi@xserver
^C

The ssh daemon is running:

lil@yserver:~ # rcsshd reload
Reload service sshd                                                                                                                 
done
lil@yserver:~ # rcsshd restart
Shutting down the listening SSH daemon                                                                                                  
done
Starting SSH daemon                                                                                                                 
done
lil@yserver:~ # ssh ubi@xserver
^C
share|improve this question
    
What have you tried? Did you try finding in man ssh that there exists a verbose mode? –  galegosimpatico Jan 30 at 15:22
1  
Are you sure xserver is running sshd? –  Slowki Jan 30 at 15:25
    
I agree with Slowki - could be that sshd isnt running on xserver or xserver has a firewall running that's blocking port the ssh port (usually 22) –  FreudianSlip Jan 30 at 15:38
    
On xserver run ps ax | grep ssh and iptables -L and you can answer both of FreudianSlip's questions :) –  NickW Jan 30 at 16:15
1  
Try running ssh with -vvv to show where it's sticking. –  Nathan C Jan 30 at 16:22

1 Answer 1

up vote 5 down vote accepted

As others explained, you need an SSH server running on xserver for this to work.

If you're able to ssh ubi@xserver from other hosts but not as lil@yserver, it could be any number of things, including but not limited to these common causes:

  • xserver resolves to a different IP address on yserver - try ping xserver on yserver and on the host which can reach xserver.
  • xserver could have firewall rules set up to allow connections from a whitelist which does not include yserver.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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