Upgrading Latest OpenSSH


OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options.

OpenSSH

OpenSSH 7.4 released December 19, 2016

Tested working on my CentOS 6.8 x64

Requirements:
yum install rpm-build gcc make wget openssl-devel krb5-devel pam-devel libX11-devel xmkmf libXt-devel

Upgrade:
cd /usr/src
wget http://mirror.jmu.edu/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz
tar -xvzf openssh-7.4p1.tar.gz

mkdir -p /root/rpmbuild/SOURCES
mkdir -p /root/rpmbuild/SPECS

cp ./openssh-7.4p1/contrib/redhat/openssh.spec /root/rpmbuild/SPECS/
cp openssh-7.4p1.tar.gz /root/rpmbuild/SOURCES/

cd /root/rpmbuild/SPECS

sed -i -e “s/%define no_gnome_askpass 0/%define no_gnome_askpass 1/g” openssh.spec
sed -i -e “s/%define no_x11_askpass 0/%define no_x11_askpass 1/g” openssh.spec
sed -i -e “s/BuildPreReq/BuildRequires/g” openssh.spec

rpmbuild -bb openssh.spec

cd /root/rpmbuild/RPMS/x86_64

rpm -Uvh *.rpm

Check Version:
ssh -V

Source:
http://thecpaneladmin.com/upgrading-openssh-on-centos-5/

For Debian 8
apt-get install zlib1g-dev libssl-dev make -y

wget http://mirror.jmu.edu/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz
tar -xvzf openssh-7.4p1.tar.gz

cd openssh-7.4p1

test ! -d /usr/local/ssl &&
./configure --prefix=/usr --sysconfdir=/etc/ssh --datarootdir=/usr

make
make install

cp ssh_config /etc/ssh/
cp sshd_config /etc/ssh/
cp moduli /etc/ssh/

/usr/sbin/sshd -t -f /etc/ssh/sshd_config

service sshd restart

If you have problems just leave comments here.

Leave a Reply

Your email address will not be published. Required fields are marked *