SSH 连接错误,连接到不同的 OpenSSH 版本

SSH 连接错误,连接到不同的 OpenSSH 版本

我最近刚刚在我的服务器上安装了 Debian 9。在此过程中,我在使用 SSH 连接时遇到了相当奇怪的行为。有时它可以完美地连接到我的服务器,有时则不然。

我安装的唯一东西几乎就是 openssh-server、apt-get install openssh-server,并且它以默认设置运行。

我从 SSH 客户端 Bitvise 6.24 的日志中注意到,服务器在连接时会响应不同的版本。有时它会说SSH-2.0-OpenSSH_5.8然后我就无法连接了。当它说SSH-2.0-OpenSSH_7.4p1 Debian-10它运行得很好。我对 Debian 还很陌生,不知道它为什么会这样。我的机器上运行着多个版本的 openssh-server 吗?我试过排除故障,但没有成功。你们以前见过这种情况吗?或者知道如何修复吗?

21:11:41.304 Started a new SSH2 session.
21:11:41.314 Connecting to SSH2 server XXX.XXX.XXX.XXX:22.
21:11:41.507 Connection established.
21:11:41.798 Server version: SSH-2.0-OpenSSH_5.8  <-----
21:11:41.798 First key exchange started.
21:11:42.438 Received a new host key from the server. Algorithm: ............
21:11:44.331 First key exchange completed using ecdh-sha2/nistp521. ............
21:11:44.412 Attempting password authentication.
21:11:45.798 Authentication failed. Remaining authentication methods: 'password'.
21:11:57.650 Authentication aborted on user's request.
21:11:57.720 The SSH2 session has been terminated.
21:12:13.332 Started a new SSH2 session.
21:12:13.342 Connecting to SSH2 server XXX.XXX.XXX.XXX:22.
21:12:13.407 Connection established.
21:12:13.472 Server version: SSH-2.0-OpenSSH_7.4p1 Debian-10  <-----
21:12:13.472 First key exchange started.
21:12:13.632 Received a new host key from the server. Algorithm: ............
21:12:15.380 First key exchange completed using ecdh-sha2/nistp521. ............
21:12:15.441 Attempting password authentication.
21:12:15.551 Authentication completed.
21:12:15.691 Terminal channel opened.

相关内容