1

When I tried to log into my remote Ubuntu server today, I got:

ssh: connect to host <ip> port 22: Connection refused

So I rebooted the server, thinking sshd might have crashed.

After the boot I could connect via ssh, but after 1 or 2 minutes the server closed the connection:

Connection to <ip> closed by remote host.

Trying to reconnect, the server refuses the connection again.

Manually doing

/etc/init.d/sshd restart

didn't help, /etc/hosts.deny seems ok.

This is extremely annoying, since I have so little time to diagnose or fix the problem. Help or ideas are greatly appreciated!

1 Answers1

1

When the error message is "Connection refused" it means that sshd is no longer listening on your ssh port. If it was your firewall, you would have received a "Timeout". In either case, do ssh with verbose option and see exactly at what step the connection is getting dropped.

SparX
  • 1,922