OpenSSH Secure Shell
OpenSSH version
Tested with OpenSSH 4.1p1.
Introduction
SSH (Secure Shell) is a way of logging into a remote machine over an encrypted connection. You'll need it in order to be able to administer your server remotely.
Installation
Download the portable (Linux-compatible) version of the
OpenSSH source code.
Install prerequisites:
sudo apt-get install zlib1g-dev libpam0g-dev libssl-dev
Uninstall the Debian ssh package:
sudo /etc/init.d/ssh stop
sudo apt-get remove ssh
Move our current ssh config to the new location:
sudo mkdir -p /usr/local/ssh
sudo mv /etc/ssh /usr/local/ssh/etc
sudo ln -s /usr/local/ssh/etc /etc/ssh
Install
/usr/local/configure-wrappers/configure-ssh (make it world-executable).
Compile and install ssh:
tar zxf openssh-x.y.z.tar.gz
cd openssh-x.y.z
/usr/local/configure-wrappers/configure-ssh
make
sudo make install
Install
/etc/init.d/ssh (make it world-exectuable).
In
/etc/profile, add
/usr/local/ssh/bin to
LOCAL_PATH, and add
/usr/local/ssh/man to
LOCAL_MANPATH.
Install
/usr/local/ssh/etc/sshd_config.
Restart
sshd:
sudo /etc/init.d/ssh start
Fix the broken
rsh broken symlink, which needs to point to current ssh binary:
sudo ln -sf /usr/local/ssh/bin/ssh /etc/alternatives/rsh
Testing
If you're not familiar with SSH, see
Getting Started with SSH for information on how to use the command-line SSH client under Linux. Then try to use
ssh to log into the server from a remote machine.
Upgrading
tar zxf openssh-x.y.z.tar.gz
cd openssh-x.y.z
/usr/local/configure-wrappers/configure-ssh
make
sudo make install
sudo /etc/init.d/ssh restart
If you're logged in via ssh while doing this, your connection to the old version of the daemon will persist until you log out, so log out and in again.
to top