#!/bin/bash
#Configuration:
temp_working_directory=/usr/local/src
openssh_source_link=http://filedump.se.rit.edu/pub/OpenBSD/OpenSSH/portable/openssh-5.6p1.tar.gz
install_prefix=/usr
#Saving old sshd init script:
cp -a /etc/rc.d/init.d/sshd /etc/rc.d/init.d/sshd.save
#Uninstall OS installed SSH
rpm -e openssh openssh-clients openssh-server
##Installing OpenSSH 5.6p1 from source:
#Downloading OpenSSH5.6p1
cd $temp_working_directory && wget -c "$openssh_source_link"
##Untaring and configure openssh
tar xfz openssh-5.6p1.tar.gz
#Removing openssh archive openssh-5.6p1.tar.gz
rm -rf openssh-5.6p1.tar.gz
cd openssh-5.6p1 ;./configure --prefix=$install_prefix && make && make install
#Restoring sshd init script
cp -a /etc/rc.d/init.d/sshd.save /etc/rc.d/init.d/sshd
#Restarting SSHD:
/sbin/service sshd restart
`which ssh` -V
echo "Duplicate your ssh connection to the server and verify that the new SSHD
No comments:
Post a Comment