linux升級openssh到高版本
可以解決OpenSSH 安全漏洞(CVE-2018-15919)和SSH服務器類型和版本
如果是新服務器,需要安裝對應命令vim 上傳下載等命令
安裝上傳或者下載命令yum install lrzsz 安裝vim:yum -y install vim*
1、下載升級包 wget openssh 8.0
2、安裝依賴和組件 yum install -y gcc openssl-devel pam-devel rpm-build
3、備份cp -r /etc/ssh sshback
4、解壓tar -zxf openssh 8.0
5、檢測 依賴和安裝環境 ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers
6、查看ssh -V 版本
7、編譯並安裝 make && make install
8、查看ssh -V 版本
9、修改查看config
vim /etc/selinux/config
將SELINUX=enforcing改為SELINUX=disabled
10、修改查看sshd_config
vim /etc/ssh/sshd_config
(1)、 #PermitRootLogin without-password 改為 PermitRootLogin yes
(2)、 #X11Forwarding no 改為X11Forwarding yes
11、授權
chmod 600 /etc/ssh/ssh_host_rsa_key
chmod 600 /etc/ssh/ssh_host_ecdsa_key
12、重啟前最好用其他工具遠程下,能遠程再重啟linux
13、重啟服務器 reboot
版權所有,轉載請申明出處