I have a server running well before but today I can not ssh to it, it shows me:
ssh: connect to host 10.0.0.117 port 22: Connection refused
I guess something is wrong with it but I can not log onto it so what can I do at this situation, at least to figure out what's the problem with it?
The
Connection refused
usually means that there isn't anything listening on the remote port. Did you configure sshd to listen on a different port than the standard one ? If you did then you can useFailing that you will have to access the system by it's console to see if sshd is running and on what port as well as checking logs for additional information.
If you have HP iLO, Dell DRAC or SUN ILOM, you can use that to login to server.
1 - Is your ssh running? (as recommended by Ian)
service status sshd
service sshd start (if it is not running)
2 - Check if the port is open (related to (1))
netstat -talpn | grep ":22"
3 - Try temporarily disabling firewall on the ssh client and server, in case outgoing port 22 or incoming port 22 is blocked in either of the machines, respectively.
/sbin/iptables -F
4 - Can you ping the ssh server
ping 10.0.0.117