suse11 openssh 升級到8.0

studywell發表於2019-05-30

SUSE 11 升級Openssh

openssh 官網下載地址:   openssh 8.0  釋出於20190418


1.檢視當前ssh 版本

ora-dbtest:~ #ssh -V

OpenSSH_6.6.1p1, OpenSSL 0.9.8j-fips 07 Jan 2009


s11:~ # cat /etc/SuSE-release

SUSE Linux Enterprise Server 11 (x86_64)

VERSION = 11

PATCHLEVEL = 3

s11:~ # ssh -V

OpenSSH_6.2p2, OpenSSL 0.9.8j-fips 07 Jan 2009


2.將安裝所需的安裝包放入/opt/openssh

root使用者執行 

mkdir /opt/openssh

cd /opt/openssh/

包含如下包:

openssh-8.0p1.tar.gz  openssl-1.1.1b.tar.gz  zlib-1.2.11.tar.gz


3.安裝 zlib

root下執行 

tar zxvf zlib-1.2.11.tar.gz

cd zlib-1.2.11/

./configure --shared

make

make install


4.安裝openssl

檢視當前版本:openssl version -a

tar zxvf openssl-1.1.1b.tar.gz

tar zxvf openssl-1.0.2n.tar.gz

cd openssl-1.0.2n/

./config shared

make

make install


mv /usr/bin/openssl /usr/bin/openssl.old

ln -s /usr/local/bin/openssl /usr/bin/openssl

ln -s /usr/local/include/openssl /usr/include/openssl

echo "/usr/local/ssl/lib" >> /etc/ld.so.conf

ldconfig |grep openssl

/sbin/ldconfig -v

openssl version -a


5.安裝openssh

tar zxvf openssh-8.0p1.tar.gz

cd openssh-8.0p1/

./configure --prefix=/usr/ --sysconfdir=/etc/ssh -with-zlib -with-ssl-dir=/usr/local/ssl -with-md5-passwords mandir=/usr/share/man

  make

  make install

cp -p contrib/suse/rc.sshd /etc/init.d/sshd

chmod +x /etc/init.d/sshd

chkconfig --add sshd

cp sshd_config /etc/ssh/

echo "PermitRootLogin yes" >> /etc/ssh/sshd_config

mv /usr/sbin/sshd{,.old}

mv /usr/bin/ssh{,.old}

cp sshd /usr/sbin/sshd

cp ssh /usr/bin/ssh

/etc/init.d/sshd restart


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29519108/viewspace-2646257/,如需轉載,請註明出處,否則將追究法律責任。

相關文章