via:
The point of this guide is to allow a user to install HPN-patched version of SSH without overriding the system-installed OpenSSH.
I use the following pattern for lo-fi, manual package management
/usr/local/versions/${PACKAGE_NAME}/${VERSION}
For this package, I will be using the following prefix:
/usr/local/versions/openssh/6.1p1-hpn13v14
cd ~/src
curl -O http://openbsd.org.ar/pub/OpenBSD/OpenSSH/portable/openssh-6.1p1.tar.gz
curl -OLJ http://www.psc.edu/index.php/component/remository/func-download/861/chk,f3db9830e15be5125dfb0404f535bf2d/no_html,1/
tar -xzf openssh-6.1p1.tar.gz
gunzip openssh-6.1p1-hpn13v14.diff.gz
cd openssh-6.1p1
patch -p1 < ../openssh-6.1p1-hpn13v14.diff
I have my own version of OpenSSL installed (via homebrew), so I have to use the --with-ssl-dir
parameter. For those that just have system-installed OpenSSL, you can ignore this
./configure --prefix=/usr/local/versions/openssh/6.1p1-hpn13v14 \
--with-ssl-dir=/usr/local/Cellar/openssl/1.0.1e
make
make install
cd /usr/local/bin
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/scp scp
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/sftp sftp
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/slogin slogin
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/ssh ssh
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/ssh-add ssh-add
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/ssh-agent ssh-agent
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/ssh-keygen ssh-keygen
ln -s ../versions/openssh/6.1p1-hpn13v14/bin/ssh-keyscan ssh-keyscan
which ssh
You should see /usr/local/bin/ssh
rm -rf ~/src/openssh-6.1p1*
remove symlinks
rm -f /usr/local/bin/{scp,sftp,slogin,ssh,ssh-add,ssh-agent,ssh-keygen,ssh-keyscan}
remove installed files
rm -rf /usr/local/versions/openssh/6.1p1-hpn13v14
remove openssh directory if no other versions are present
rm 2&>1 -d /usr/local/versions/openssh