Linux系统下怎么升级OpenSSH?

  最近很多Linux用户使用OpenSSH的时候出现了故障,解决的方法很简单,那就是在Linux中安装OpenSSH新的版本。那么Linux系统下怎么升级OpenSSH呢?

Linux系统下怎么升级OpenSSH?

  注意:升级过程中不要重启sshd服务,否则会远程连接不上!!

  升级版本为:openssh-6.6p1

  升级方法:

  1、加载本地源(方法不描述了)

  2、执行下列命令

  yum install bash -y

  yum install -y zlib zlib-devel openssl openssl-devel

  tar -zxvf openssh-6.6p1.tar.gz -C /usr/local/src/

  cd /usr/local/src/openssh-6.6p1/

  cp /etc/init.d/sshd /etc/init.d/sshd.old

  tar -cvf ssh.bak.tar /etc/ssh

  yum install gcc -y

  3、卸载老版本

  rpm -qa|grep ssh

  rpm -e openssh-server-5.3p1-81.el6.x86_64

  rpm -e openssh-clients-5.3p1-81.el6.x86_64 –nodeps

  rpm -qa|grep ssh

  rpm -e openssh-askpass-5.3p1-81.el6.x86_64

  rpm -e openssh-5.3p1-81.el6.x86_64

  rpm -qa|grep ssh

  4、开始升级

  。/configure –prefix=/usr –sysconfdir=/etc/ssh –with-zlib –with-md5-passwords

  make && make install

  mv /etc/init.d/sshd.old /etc/init.d/sshd

  mkdir -p /var/empty/sshd/etc

  /etc/init.d/sshd restart

  chkconfig –add sshd

  chkconfig sshd on

  chkconfig –list|grep sshd

  5、查看是否升级成功

  ssh -V

  OpenSSH_6.6p1, OpenSSL 1.0.0-fips 29 Mar 2010

  以上就是Linux系统下怎么升级OpenSSH的介绍了,升级成功了旧版本的一些问题和故障自然就能得到修复了。

未经允许不得转载:系统吧-电脑系统大神 » Linux系统下怎么升级OpenSSH?

赞 (0)