2

My server is running Ubuntu 18.04 and I'm having issues with SSH. Every time I log in, the connection is closed immediately after entering the password.

Connection closed by 193.xxx.xxx.xxx port 22

These are my logfiles: https://pastebin.com/2G4V52Vt (first part is the client-log, the second part contains the server logs in debug-mode)

I see that publickey authentication fails, but I guess that doesn't matter since I'm using a password instead.

The issue seems to affect all users and it doesn't matter which shell the user is using. (I tried /bin/bash, /bin/sh and /bin/rbash).

Can someone please help me with this? Please let me know, if you need more information.

6
  • as you said all users affected, might be the OpenSSL version client version Local version string SSH-2.0-OpenSSH_7.8 and server version says SSH-2.0-OpenSSH_6.7p2 Ubuntu-4 so might be incompatibilities. You might stop sshd on the server and start in debug mode, option -ddd
    – Zina
    Nov 10 '18 at 18:20
  • I am running sshd in debug mode. The log is at the end of the paste (sorry for not making it clear, that the paste contains both the server and the client logs)
    – FelixSFD
    Nov 10 '18 at 19:00
  • have you tried another ssh client? maybe something useful here
    – Zina
    Nov 10 '18 at 20:06
  • Yes. I tried Putty on Windows from a different network.
    – FelixSFD
    Nov 10 '18 at 20:17
  • 1
    I have a Ubuntu 18.04 VM and when I start sshd I get version information: debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2n 7 Dec 2017 so maybe and update of ssh server might fix your issue
    – Zina
    Nov 10 '18 at 20:40
2

In the provided log output we can see that the client and server are using different OpenSSL versions:

  • client: SSH-2.0-OpenSSH_7.8
  • server: SSH-2.0-OpenSSH_6.7p2

Which in this case was the reason that the connection got closed. OP removed SSH server and installed the correct version which resolved his issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.