首页 > 代码库 > centos 7 openssh7.4升级

centos 7 openssh7.4升级

            Openssh7.4升级步骤




#第一步安装GCC工具    (有yum源最好,直接yum gcc和pam)
rpm -ivh libmpc-1.0.1-3.el7.x86_64.rpm
rpm -ivh cpp-4.8.2-16.el7.x86_64.rpm
rpm -ivh gcc-4.8.2-16.el7.x86_64.rpm
rpm -ivh pam-devel-1.1.8-9.el7.x86_64.rpm

#第二步安装zlib-1.2.8.tar.gz
tar -xvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make
make install

#验证查看
ll /usr/local/lib

#第三步安装Openssl-fips
tar -xvzf openssl-fips-2.0.12.tar.gz
cd  openssl-fips-2.0.12/
./config
make
make install

#第四步安装openssl-1.0.2c.tar.gz
tar -xvzf  openssl-1.0.2c.tar.gz
cd openssl-1.0.2c/
./config
make
make install

#第五步安装openssh-7.4.p1
tar -xvzf openssh-7.4p1.tar.gz
cd   openssh-7.4p1
./configure   --prefix=/usr   --sysconfdir=/etc/ssh   --with-md5-passwords   --with-pam   --with-tcp-wrappers   --with-ssl-dir=/usr/local/ssl   --without-hardening
make
make install
cp /root/scripts/openssh/openssh-7.4p1/ssh_config /etc/ssh/ssh_config
cp /root/scripts/openssh/openssh-7.4p1/sshd_config /etc/ssh/sshd_config
cd /root/scripts/openssh/openssh-7.4p1/contrib/redhat
pwd
/root/scripts/openssh/openssh-7.4p1/contrib/redhat
####以下操作注意路径
mv /etc/init.d/sshd /etc/init.d/sshd20170320
cp sshd.init /etc/init.d/sshd
chmod u+x /etc/init.d/sshd
chkconfig --add sshd
> ~/.ssh/
>.ssh/known_hosts
service sshd restart

升级后要关闭selinux  否则连接报错permission deny
##注意:  升级后的版本需要用最新版本的远程连接工具才能进行连接,比如putty0.68。

centos 7 openssh7.4升级