-------------------------------------------------html
1、下载地址centos
2、系统版本及建议bash
3、安装opensslssh
4、安装opensshtcp
5、验证ide
-------------------------------------------------工具
1、下载地址阿里云
openssl下载地址:spa
https://www.openssl.org/source/
openssh下载地址:操作系统
https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/
2、系统版本及建议
操做系统版本:centos 6.3 64位
openssh和openssl版本:
# ssh -V OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
升级前建议打开telnet服务,使用telnet进行登陆操做,避免没法远程链接
3、安装openssl
1.安装相关编译工具
# yum install gcc make perl pam pam-devel zlib zlib-devel openssl-devel
2.编译安装openssl
# cd openssl-1.0.2l # ./config --prefix=/usr/local/ssl shared zlib # make # make install
3.备份历史的openssl文件
# mv /usr/bin/openssl /usr/bin/openssl.bak # mv /usr/include/openssl /usr/include/openssl.bak
4.设置软链接,使用新的openssl版本,openssl安装在/usr/local/ssl目录
# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl # ln -s /usr/local/ssl/include/openssl /usr/include/openssl
5.修改系统自带的openssl库文件,软连接到升级后的libssl.so
# ln -s /usr/local/ssl/lib/libssl.so.1.0.0 /usr/local/lib64/libssl.so
6.更新动态连接库数据
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf # ldconfig -v
7.查看新安装的openssl版本
# openssl version OpenSSL 1.0.2l 25 May 2017
4、安装openssh
1.中止ssh服务
# service sshd stop
2.卸载openssh-server,并备份历史配置文件
# rpm -qa |grep openss openssl-1.0.0-27.el6.x86_64 openssh-5.3p1-84.1.el6.x86_64 openssh-server-5.3p1-84.1.el6.x86_64 # rpm -e openssh-server # mv /etc/ssh /etc/ssh.bak
3.编译并安装openssh
# cd openssh-7.5p1 # ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-ssl-dir=/usr/local/ssl --with-md5-passwords # make # make install
4.查看新安装的openssl版本
# ssh -V OpenSSH_7.5p1, OpenSSL 1.0.2l 25 May 2017
5.配置ssh
# cp openssh-7.5p1/contrib/redhat/sshd.init /etc/init.d/sshd //加入系统服务 # chkconfig --add sshd # vi /etc/ssh/sshd_config //容许root远程登陆 PermitRootLogin yes //将prohibit-password替换为yes # service sshd start # netstat -tupln |grep 22 tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 36385/sshd tcp 0 0 :::22 :::* LISTEN 36385/sshd
5、验证
阿里云开年HI购季,爆款云产品低至5折!
送您一个最高1000元的阿里云大礼包,快来领取吧~
https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=pdhbtt9j