小编Onf*_*ire的帖子

升级后运行的旧 SSH 服务器版本

我们有一个运行 16.04 的 Ubuntu 服务器,用于客户端网站。客户最近完成了安全审核,建议之一是将我们的 OpenSSH 版本至少更新到 7.4 版本,但 16.04 预装了 7.2。我尝试直接进行更新,但 7.2 是可用的最新版本,因此我们现在尝试手动安装 7.6。

我已经下载并安装了7.6,看起来运行良好:

sshd 
OpenSSH_7.6p1, OpenSSL 1.0.2g  1 Mar 2016
Run Code Online (Sandbox Code Playgroud)

但是,当远程连接或什至只是运行时,ssh -v localhost它会使用旧的 7.2 进行连接:

root@server-new:~# ssh -v localhost
...
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 
Ubuntu-4ubuntu2.2
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 pat OpenSSH* compat 0x04000000
...
Run Code Online (Sandbox Code Playgroud)

这基本上是我经历过的过程,除了 7.6 包: https: //gist.github.com/techgaun/df66d37379df37838482c4c3470bc48e

我注意到安装目录现在不同了,以前是,/usr/sbin/ssh但现在是/usr/local/sbin/ssh

root@server-new:~# which sshd
/usr/local/sbin/sshd
root@server-new:~# which ssh
/usr/local/bin/ssh
Run Code Online (Sandbox Code Playgroud)

我确实更新了 /etc/init.d/ssh 和 /etc/init/ssh.conf …

upgrade server ssh openssh sshd

3
推荐指数
1
解决办法
5820
查看次数

标签 统计

openssh ×1

server ×1

ssh ×1

sshd ×1

upgrade ×1