OpenSSH怎么更新升级到8.1

1.安装必要组件:

yum install -y gcc openssl-devel pam-devel rpm-build

2.下载OpenSSH最新版本:


https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
在以上网站找到最新版链接并下载解压
wget https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gz
tar -zxvf openssh-8.1p1.tar.gz
 

3.到openssh-8.1p1目录下编译并安装最新版OpenSSH:

./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers

若有问题:
https://blog.51cto.com/songky/1966494
如果没报错则执行安装命令
make && make install
 

4.查看OpenSSH版本信息

ssh -V

5.修改配置vim /etc/ssh/sshd_config

PermitRootLogin yes 
PubkeyAuthentication yes 
PasswordAuthentication yes

6.重启并处理异常


service sshd restart
如果出现以下异常
/etc/ssh/sshd_config line 81: Unsupported option GSSAPIAuthentication
/etc/ssh/sshd_config line 83: Unsupported option GSSAPICleanupCredentials
则注释掉相关行数即可。
 
 

 

你可能感兴趣的:(Linux)