HPN-SSH Installation guide
Supported Operating Systems: |
|
|
|
Manual installation supported: |
|
|
Table of contents: |
|
Warnings: |
Do not attempt SSH removal/reinstallation etc if you don't have other way to connect to the server! Don't try to use ubuntu packages on other distros if they aren't package-compatible |
HPN-SSH is a modification of original openssh-server. It's meant to allow very fast SFTP transfers. Right now if you have 100 Mb/s download and you try to download file from SFTP then about HALF of your download speed is wasted for the protocol. Using HPN-SSH you can reduce this penalty to less than 5% speed of your download.
By using this modification you can still have your maximum security profits from SFTP transfer WITH speed of FTPS connection. It's win-win for everyone!
2. Where to get it
There are two ways you can get HPN-SSH:
- Using precompiled packages (highly recommended) - https://launchpad.net/~yoda-jazz-kc/+archive/ubuntu/hpn-ssh
- Using source patches and patch openssh-server manually - GitHub - rapier1/hpn-ssh: HPN-SSH is a set of patches designed to enhance OpenSSH
I highly recommend that you use precompiled packages as you will avoid most problems at start.
3. Before the installation
Okay we want to install hpn-ssh to get fast SFTP transfers but... we're currently using SSH to connect to the server and if something breaks then we will be left without being able to connect our own server!
Solution is simple. Install another program to connect to the server in case if something will break our SSH connection
I've installed telnet in my case. It's simple, obsolete and insecure program but it should be enough for a moment of installation. Remember to remove it later
Use this command to install telnet server in Ubuntu:
Code:
sudo apt-get install telnetd
Code:
/etc/init.d/inetd start
Try to connect to your server on port 23 (telnet) now. If you can login without problems we can go to the next part. Don't worry, you can still use SSH connection to make the installation, it won't automatically disconnect during the installation so we may not need telnet at all but better be safe than sorry.
4. Installation (FINALLY)
4.1. Installation from repo
First we need to add hpn-ssh repo to our database as it's not a official repository. Accept SSL key if asked.
Code:
sudo add-apt-repository ppa:yoda-jazz-kc/hpn-ssh sudo apt-get update
Code:
sudo apt-get remove openssh-client openssh-server

Now there are several ways to force ubuntu to install SSH from specified repo, they all have cons and pros so I will use SIMPLIEST one. What's the simpliest way? Comment out official repos and let ubuntu update, it will find only one ssh package, one from hpn-ssh. Why use hack like that? Because openssh has a lot of dependencies and they are colliding with each other repo, we would need to type tons of text to get it installed "correct" way. I also tried setting hpn-ssh repo "higher" than official one and it didn't worked so I used this method.
VNC users can use Synaptic or other GUI tools to turn off official repositories temporarily
Lets edit /etc/apt/sources.list
Code:
nano /etc/apt/sources.list
Code:
deb http://mirrors.online.net/ubuntu/ xenial restricted main
Code:
#deb http://mirrors.online.net/ubuntu/ xenial restricted main
Okay, now we need to update repos
Code:
sudo apt-get update
Code:
apt-cache showpkg openssh-server
Code:
1:7.1p2-hpn14v9-2~ubuntu16.04.1
Code:
sudo apt-get install openssh-server openssh-client
Now we need to restart SSH daemon. If everything was done correctly we should be able to connect to the server after sshd restart.
Code:
sudo service sshd restart
Now type
Code:
ssh -V
Code:
OpenSSH_7.1p2-hpn14v9 Ubuntu-hpn14v9-2~ubuntu16.04.1, OpenSSL 1.0.2g 1 Mar 2016
Remember to uncomment official repos and disable openssh-server package from being updated!
4.2. Installation from source
Do not do this if you aren't experienced in linux! You've been warned
Notice that I didn't tested this way! It should work but I can not guarantee!
Use following git repo - GitHub - rapier1/hpn-ssh: HPN-SSH is a set of patches designed to enhance OpenSSH
Get original openssh source files from official repo
Remove SSH
Code:
sudo apt-get remove openssh-client openssh-server
Apply patches, configure, compile and install files from git repo (refer to README file)
Restart sshd
Code:
sudo service sshd restart
Now type
Code:
ssh -V
Code:
OpenSSH_7.1p2-hpn14v9 Ubuntu-hpn14v9-2~ubuntu16.04.1, OpenSSL 1.0.2g 1 Mar 2016
5. Things you need to know about HPN-SSH
- HPN-SSH is exactly as secure as original openssh is, don't worry about security. It's just about speed.
- There are almost no cons using HPN-SSH so it should be used everywhere you need fast file transfers
- You can also set it to turn off encryption after connection was made to speed it up even more but I don't recommend it for torrents
- HPN-SSH author is currently asking for donations, please consider donating him as this project is very useful for all torrent users.
6. Test your transfer speed now!
Before (Openssh-server from official repo)


That's all! I hope by writing this guide I will help someone!
Comment