Upgrade OpenSSH on Centos 5

If you notice the new version of OpenSSH couldn’t installed just by,
# yum update

Also it’s not available in CentOS repositories so in this article I want to tell you how to installed manually used the tarball

First, download the OpenSSH source tarball from the vendor and unpack it. You can find the tarballs at http://www.openssh.com/portable.html

# wget http://mirror.mcs.anl.gov/openssh/portable/openssh-5.8p2.tar.gz

# tar -xvzf openssh-5.8p2.tar.gz

Copy the spec file and tarball:
# cp ./openssh-5.8p2/contrib/redhat/openssh.spec /usr/src/redhat/SPECS/
# cp openssh-5.8p1.tar.gz /usr/src/redhat/SOURCES/

Let’s make the specified files and do some installing:
# cd /usr/src/redhat/SPECS
# perl -i.bak -pe 's/^(%define no_(gnome|x11)_askpass)\s+0$/$1 1/' openssh.spec

Build the RPM
# rpmbuild -bb openssh.spec

Now if you go back into /usr/src/redhat/RPMS/ , Navigate into the folder that suits your OS install, (x86 was mine), You should then see three RPMs. Go ahead and install them:
# rpm -Uvh *.rpm

To verify the installed version, just type
# ssh -v localhost

You should get an out put like the following:
OpenSSH_5.8p2 CentOS *, OpenSSL 0.* **********

* = Version numbers so ignore those, as I didn’t want to disclose that information.



No responses so far, want to say something?

Leave a Reply