2

Today I did a ubuntu release upgrade on my server from 16.04 to 18.04. After the system rebooted, my ssh connection to the server (From putty) failed with "Remote side unexpectedly closed network connection". Right now I only have access to the server filesystem through the Virtuozzo power panel. In my /var/log/auth.log there are no entries with of my login attemps. Nmap still shows an open port at 22. Right now I have no Idea where to look for causes for this problem. Through Virtuozzo I may start a repair mod, which starts a temporary setup with the original file system in a /repair directory. Where can I look for causes of this problem?

Tyde
  • 121
  • 1
    Is this a problem like https://www.joho.se/2016/05/13/ssh-keys-are-no-longer-working-after-upgrading-to-ubuntu-16-04-lts-help/? – randominstanceOfLivingThing Mar 28 '20 at 16:28
  • Check your .ssh/authorized_keys and make sure your public key is in there else you may have to add yours. – randominstanceOfLivingThing Mar 28 '20 at 16:30
  • authorized_keys is still intact and correct. The linked problem is different as the author did get a password prompt. Here the server does not even get to the part of authorization but cancels the connection before. – Tyde Mar 28 '20 at 16:45
  • Try doing ssh -v <user>:<host> from the command line. It would print a line like debug1: Authentications that can continue: publickey,password,keyboard-interactive. Can you print the output of the command. – randominstanceOfLivingThing Mar 28 '20 at 17:18
  • You can also do ssh -G -vvv <username>@<host> as per the discussion at https://serverfault.com/questions/717129/how-to-show-the-host-configured-default-ssh-configuration – randominstanceOfLivingThing Mar 28 '20 at 18:18
  • That is the result that I get https://gist.github.com/Tyde/911bca9fed4f4b70aa3052f9ab76ef0d The server closes the connection after SSH2_MSG_KEXINIT – Tyde Mar 28 '20 at 22:16
  • Lookup this: https://unix.stackexchange.com/questions/467312/ssh-connection-reset-by-ip-port-22-ubuntu-16-04. Very close to what you are seeing. It may be related to you private key file permissions. Once you login to your server, you should be able to see your ssh logs using the command sudo journalctl -u sshd – randominstanceOfLivingThing Mar 29 '20 at 01:32
  • Note that what you see is not ssh's fault, but a network problem. An SSH server would close gracefully during session start-up, and the message would read "Session closed by remote host." – rexkogitans Mar 29 '20 at 11:41

0 Answers0