installing and rebuilding ssh

Type the following commands

—————–

first install some important tools

sudo aptitude install build-essential libpam-dev
or
sudo apt-get install build-essential libtool libusb-dev libpam0g-dev pkg-config
cd && mkdir dev && cd dev
wget -c http://www.openssl.org/source/openssl-0.9.8e.tar.gz
wget -c ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-4.6p1.tar.gz

website to retrieve sources

OpenSSL (http://www.openssl.org/)
OpenSSH (http://openssh.org/)
Unpack the archives:

for i in `ls *.gz`; do tar zvxf $i; done
cd openssl-0.9.8e

Configure openssl:
./config –prefix=/opt/openssl-0.9.8e

Compile openssl:
make
make tests
sudo make install

install openssh-server
sudo mv /etc/ssh /etc/ssh.bak
cd ../openssh-4.6p1
./configure –prefix=/usr –sysconfdir=/etc/ssh –with-pam –with-ssl-dir=/opt/openssl-0.9.8e
make
sudo make install
sshd -V

Which should return OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007

Restart the server:

sudo /etc/init.d/ssh restart
And test it

telnet localhost 22

Which should return SSH-1.99-OpenSSH_4.6

Advertisements

Comments are closed.

%d bloggers like this: