升级OpenSSh到 7.3p1
1、开启 telnet 服务
Linux
yum install -y telnet-server telnet
/etc/xinet.d/telnet 中的yes 修改为no
service xinetd restart
AIX
lssrc -s inetd
startsrc -t telnet
stopsrc -t telnet
2、下载相关文件
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.3p1.tar.gz
wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz
wget https://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz --no-check-certificate
3、编译安装
tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make && make install
tar zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./config --prefix=/usr/ --shared
make
make test
make install
tar zxvf openssh-7.3p1.tar.gz
cd openssh-7.3p1
./configure --prefix=/usr/local >#Will install OpenSSH in /opt/{bin,etc,lib,sbin}
--sysconfdir=/etc/ssh >#will place the configuration files in /etc/ssh.
make
make install
4、修改启动文件并重启
vi /etc/init.d/sshd ,修改
SSHD=/usr/sbin/sshd 为 SSHD=/usr/local/sbin/sshd
/etc/init.d/sshd restart
5、telnet 127.0.0.1 22验证 根据回显看是否成功
6、替换命令
mv /usr/bin/ssh /usr/bin/ssh_bak
mv /usr/local/bin/ssh /usr/bin/ssh