installing and rebuilding ssh

Type the following commands


first install some important tools

sudo aptitude install build-essential libpam-dev
sudo apt-get install build-essential libtool libusb-dev libpam0g-dev pkg-config
cd && mkdir dev && cd dev
wget -c
wget -c

website to retrieve sources

OpenSSL (
OpenSSH (
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 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
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


Comments are closed.