Cannot SSH to Second Computer in Network – Troubleshooting

networkingport-forwardingputtyrouterssh

I have two Linux servers running right now. The first one works just fine when I try to connect from PuTTY.

  • Port 22 is forwarded for my working SSH server.
  • Port 911 is forwarded for my not working SSH server

I cannot connect to the second server using the internal IP address or the external IP address. When trying to connect to the internal, I receive this message from PuTTY:

Network Error: Connection Refused.

When I try using the external IP address it will just time out.

The two server IP addresses and other information are listed below.

Working server:
IP: 253.68.xxx.xx:22 <-Port 22 is being forwarded on my router

Not Working server:
IP: 192.168.1.222:911 <-Port 911 is being forwarded
or
IP: 253.68.xx.xx:911

I have looked at several posts by other people with this issue, and I have had mixed advice. Some people have advised editing the /etc/ssh/sshd_config file while others have advised against it.

Best Answer

The error messages from /var/log/auth indicate that the installation of ssh did not complete properly. Host keys do not exist, and without host keys, ssh is unable to initiate user authentication.

You don't mention the flavor of Linux (redhat,debian,gentoo) and each has a different command structure for re-installing the sshd.

My recommendation is to uninstall then re-install the sshd daemon on Linux, then try again. If you get the host key error again, then perhaps your distro requires you to manually create those keys. See the readme file for sshd and that should guide you.

Related Question