Ssh – Putty SSH connection not working

puttysolarisssh

I am trying to connect to a solaris server using putty from a windows client. SSH connection is not working. The terminal window just gives an error message "Network error:Connection refused". Telnet using putty is working fine with the same server. Can someone please detail what configurations needs to be checked in this case? How to troubleshoot? (There are other servers in the same network which allows SSH connection.)

Best Answer

Here is a series of steps you can use to diagnose the problem:

  1. Check if sshd is running on the host(ps -ef|grep ssh)
  2. Ensure that sshd is binding to port 22 using netstat (netstat -al|grep "LISTEN " should work)
  3. See if you can connect to the real IP address via ssh from the host machine (if not, there is either a local firewall, or sshd is not working as it should
  4. Try to ping the host from the client machine (if this fails, there is a routing problem)
  5. Try to telnet to port 22 from the client machine (telnet 192.168.1.1 22) (if this fails, a firewall is blocking you)
  6. Finally, if all the above succeed, but you cannot ssh using the ssh client - re-install your ssh client.