0
点赞
收藏
分享

微信扫一扫

升级OpenSSH


4.查看OpenSSH版本信息

ssh -V

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-7.5p1.tar.gz
tar -zxvf openssh-7.5p1.tar.gz -C /usr/local/bin

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

./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers
如果没报错则执行安装命令
make && make install

4.查看OpenSSH版本信息

ssh -V

5.修改配置

vim /etc/ssh/sshd_config

去掉此行#,如果想远程能够远程登录root用户

PermitRootLogin yes

6.重启并处理异常

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

举报

相关推荐

0 条评论