Skip to content

Instantly share code, notes, and snippets.

@imagescape
Created April 8, 2013 14:37
Show Gist options
  • Save imagescape/5337264 to your computer and use it in GitHub Desktop.
Save imagescape/5337264 to your computer and use it in GitHub Desktop.
Install openssh in an alternate location from source
# We will assume installation in the /opt/ directory
mkdir /opt/openssh/
cd /opt/openssh/
# gather and install the dependencies
wget http://zlib.net/zlib-1.2.7.tar.bz2
tar jxvf zlib-1.2.7.tar.bz2
cd zlib-1.2.7
./configure --prefix=/opt/openssh/dist/
make
make install
cd ../
wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz
tar zxvf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config --prefix=/opt/openssh/dist/
make
make install
# install the openssh source code (pick a mirror on http://www.openssh.org/portable.html)
wget http://mirror.team-cymru.org/pub/OpenBSD/OpenSSH/portable/openssh-6.2p1.tar.gz
tar zxvf openssh-6.2p1.tar.gz
cd openssh-6.2p1
./configure --prefix=/opt/openssh/dist/ --with-zlib=/opt/openssh/dist --with-ssl-dir=/opt/openssh/dist/
make
make install
# to run the ssh daemon:
sudo /opt/openssh/dist/sbin/sshd -f /opt/openssh/dist/etc/sshd_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment