本文共 1073 字,大约阅读时间需要 3 分钟。
务器版本:centos 6.8
openssh版本:openssh-7.5p11.升级openssl
wget tar -xf openssl-1.0.2j.tar.gzcd openssl-1.0.2j/ && ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl --sharedyum install -y openssl-devel
make && make installmv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl ln -s /usr/local/openssl/include/openssl /usr/include/openssl echo "/usr/local/openssl/lib">>/etc/ld.so.conf ldconfig -v echo 'export OPENSSL=/usr/local/openssl/bin' >>/etc/profileecho 'export PATH=$OPENSSL:$PATH:$HOME/bin' >>/etc/profilesource /etc/profileopenssl version -a2.升级openssh
wget tar -xf openssh-7.5p1.tar.gz && cd openssh-7.5p1yum install -y zlib-devel pam-devel tcp_wrappers-devel./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-tcp-wrappers --with-ssl-dir=/usr/local/opensslmake && make installssh -V#这一行为允许root账户登录
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_configservice sshd restart转载于:https://blog.51cto.com/yenokia/2083055