Upgrade OpenSSH under Linux

Source: Internet
Author: User

First, download the latest version OpenSSH

OpenSSH's official website: http://www.openssh.com

This is OPENSSH-6.2P1 i downloaded here.

Use the SSH-V command to see

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/38/C8/wKiom1O0uAzS7ME5AAKIaP4gKZ8241.jpg "title=" 1.png " alt= "Wkiom1o0uazs7me5aakiap4gkz8241.jpg"/>

#安装相关的组件

Yum-y install gcc openssl-devel pam-devel rpm-build


Second, the following start to upgrade SSH, here I wrote two ways to upgrade

1. Compile and install OpenSSH

# tar xzvf openssh-6.2p1.tar.gz# cd openssh-6.2p1#./configure--prefix=/usr--sysconfdir=/etc/ssh

Download is the source package to compile, note my compilation path, I am talking about OpenSSH installed in the original path, so after the installation after the completion of the need not in the Copy sshd service to/etc/init.d/! , you can customize the installation path according to the actual situation.

makemv/etc/ssh/*/etc/sshbak/because I made the installation in the original path, so I moved the old configuration file position, or make install will error! Make install

/etc/init.d/sshd restart

Pay attention to security here, if you compile an error before, and also force installation, sshd service may not get up


Chkconfig--add sshd chkconfig sshd on


After you restart the SSH service, review the version

[[email protected] ~]$ ssh -vopenssh_6.2p1, openssl 0.9.8e-fips-rhel5 01  Jul 2008usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c  Cipher_spec]           [-d [bind_address:]port]  [-e escape_char] [-F configfile]            [-I pkcs11] [-i identity_file]            [-L [bind_address:]port:host:hostport]            [-l login_name] [-m mac_spec] [-o ctl_cmd] [-o option]  [-p port]           [-r [bind_address:] port:host:hostport] [-s ctl_path]           [ -w host:port] [-w local_tun[:remote_tun]]           [[email  Protected]]hostname [command]

Successfully upgraded to version 6.2!


2, RPM Package installation

Compile the source program for RPM installation package

CP/ROOT/OPENSSH-6.2P1/CONTRIB/REDHAT/OPENSSH.SPEC/USR/SRC/REDHAT/SPECS/CP openssh-6.2p1.tar.gz/usr/src/redhat/ SOURCES/CP x11-ssh-askpass-1.2.4.1.tar.gz/usr/src/redhat/sources/perl-i.bak-pe ' s/^ (%define no_ (gnome|x11) _ Askpass) \s+0$/$1 1/' OPENSSH.SPEC//backup This file RPMBUILD-BB openssh.spec//Make build RPM package

Install the compiled RPM package

cd/usr/src/redhat/rpms/' uname-i ' RPM-UVH openssh*rpm


You can also look at the following blog post, the SSH upgrade written in very detailed

http://blog.csdn.net/luojiafei/article/details/7262796


This article is from the "Operation and maintenance record Mei Ling" blog, please be sure to keep this source http://meiling.blog.51cto.com/6220221/1433806

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.