最近看到有朋友說ssh出現漏洞,7.3一下的不安全,因此就去升級了下,vim
過程以下: 先在安裝相關包安全
yum install -y gcc openssl-devel pam-devel rpm-buildapp
wget https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gzssh
tar -zxvf openssh-7.5p1.tar.gztcp
cd openssh-7.5p1ui
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappersrest
make && make installmd5
查看版本 ssh -Vssl
修改配置文件 vim /etc/ssh/sshd_configget
若是想遠程可以遠程登陸root用戶,去掉此行#PermitRootLogin yes
重啓並處理異常 service sshd restart 若是出現如下異常 /etc/ssh/sshdconfig
line 81: Unsupported option GSSAPIAuthentication /etc/ssh/sshdconfig
line 83: Unsupported option GSSAPICleanupCredentials
註釋掉相關行數便可