Linux openssh升級8.0
#下載openssh連線
--(1)檢查openssh
# rpm -qa|grep openssh
openssh-clients-6.6.1p1-31.el7.x86_64
openssh-server-6.6.1p1-31.el7.x86_64
openssh-6.6.1p1-31.el7.x86_64
--(2)避免openssh失敗無法登陸安裝telnet
yum install -y telnet-server xinetd --安裝
echo -e 'pts/0\pts/1\npts/2\pts/3' >>/etc/securetty
systemctl enable xinetd.service
systemctl enable telnet.socket
systemctl start telnet.socket
systemctl start xinetd
--(3)解除安裝舊的openssh
# rpm -e `rpm -qa | grep openssh` --nodeps
如果之前就是原始碼安裝的,找到之前的安裝包,在裡面執行
make uninstall
--(4)安裝必要的軟體:
yum -y install gcc pam pam-devel zlib zlib-devel openssl-devel
--(5)解壓編譯
tar -zxvf openssh-8.0p1.tar.gz
cd openssh-8.0p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-zlib --with-ssl-dir=/usr/local/ssl \
--with-privsep-path=/var/lib/sshd
make
make install
如果遇到如下報錯:chmod 600 /etc/ssh/ssh_host_*
install -v -m755 contrib/ssh-copy-id /usr/bin
install -v -m644 contrib/ssh-copy-id.1 /usr/share/man/man1
install -v -m755 -d /usr/share/doc/openssh-8.0p1
install -v -m644 INSTALL LICENCE OVERVIEW README* /usr/share/doc/openssh-8.0p1
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
echo 'UsePAM yes' >> /etc/ssh/sshd_config
cp -p contrib/redhat/sshd.init /etc/init.d/sshd
chmod +x /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
chkconfig --list sshd
--(6)重啟驗證
systemctl restart sshd
--(7)驗證完畢後,關閉telnet服務
vi /etc/securetty
刪除增加的4行:
pts/0
pts/1
pts/2
pts/3
#停止telnet服務
systemctl stop telnet.socket
systemctl disable telnet.socket
systemctl stop xinetd.service
systemctl disable xinetd.service
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30327022/viewspace-2643917/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- suse11 openssh 升級到8.0
- RHEL6_CentOS6_Openssh8.0p1升級CentOS
- Ubuntu升級opensshUbuntu
- aix升級opensshAI
- 升級openssh7.9
- OpenSSH升級(從OpenSSH_7.4p1升級到OpenSSH_8.4p1) [操作指令碼]指令碼
- 原始碼升級SUSE openssh原始碼
- Centos升級到openssh9.7CentOS
- redhat系統升級openssh到7.5Redhat
- Centos6.5 離線 Openssh 升級CentOS
- CentOS6.9下升級預設的OpenSSH操作記錄(升級到OpenSSH_7.6p1)CentOS
- MySQL 5.7 升級到 8.0MySql
- Centos7 升級openssh到最高版本CentOS
- openssh 漏洞修復 openssl升級 OpenSSH_9.8p1麒麟系統
- Ctyun系統升級OpenSSH 9.3詳細教程
- Ubuntu16.04升級openssh-9.8p1Ubuntu
- linux opensshLinux
- Centos7 openssh升級到7.9p1CentOS
- centos6.5中openssh從5.3升級到7.3CentOS
- Openssh-7.9p1升級+系統調優
- RockyLinux8伺服器升級openssh9.9Linux伺服器
- Centos7 升級至openssh-9.8p1CentOS
- redhat 7.4從openssh7.6離線升級openssh8.4p1解決方法Redhat
- Openssh 8.4p1及Openssl 1.1.1h升級
- oraclelinux9.2內網升級OpenSSH9.8p1OracleLinux內網
- 升級openssh前安裝zlib報異常configure aborting
- openSSH升級公鑰失效Permission denied (publickey)解決方案
- 升級MySQL8.0的歷險記MySql
- openssh升級7.4p1至8.4p1、openssl升級至openssl-1.1.1h
- Centos 7.4系統升級OpenSSH 8.4p1服務CentOS
- Linux升級GCCLinuxGC
- Linux核心升級Linux
- RHEL7X_CentOS7X_升級Openssh7.6p1CentOS
- kali linux升級記Linux
- WPF NET5 Prism8.0的升級指南
- 不可不知的 MySQL 升級利器及 5.7 升級到 8.0 的注意事項MySql
- GitHub是怎樣把MySQL 5.7升級到8.0的?GithubMySql
- windows10 MySQL5.7升級至MySQL8.0WindowsMySql