Menu

HPN-SSH

January 8, 2025

HPN-SSH

Description

HPN-SSH is a drop in replacement for sftp/scp that removes the internal buffering restrictions of standard sftp/scp, providing over 100X speedup on a high RTT WAN path.

The new version of HPN-SSH is very easy to install. For best performance it must be installed on both client and server sides, and may involve modifying host or router firewall rules. However server side only installs will also provide > 10X speedup. HPN-SSH can also be used with rsync, as shown below.

Installation Instructions

Source code is available on github,  but it is much easier to install directly from the launchpad or COPR repositories.

Ubuntu:

   sudo add-apt-repository ppa:rapier1/hpnssh
sudo apt update; sudo apt install hpnssh

Fedora:

   sudo dnf install dnf-plugins-core 
sudo dnf copr enable rapier/hpnssh -y; sudo dnf install hpnssh

This will install the following binaries: hpnscp, hpnssh, hpnsftp, hpnsshd, and automatically starts the server and its add it to systemctl.

Note that hpnsshd runs on port 2222 by default, so that port will need to be open. You can change this in /etc/hpnssh

Sample commands

   hpnssh user@host ls /storage
hpnsftp user@host:/storage/results.dat .
echo "put results.dat results.dat" | hpnsftp user@host
hpnscp user@host:/storage/results.dat .
rsync -av --progress -e "/usr/bin/hpnssh" data_dir user@host:data_dir

# HPN server with default scp/sftp client examples
sftp -P 2222 user@host:results.dat .
echo "put results.dat results.dat" | sftp -P 2222 user@host
rsync -av --progress -e "ssh -p 2222" data_dir user@host:data_dir

On an 88ms ESnet 100G path, hpnsftp was almost 300x faster that default sftp, and rsync with hpnssh was 100x faster!

Using the hpnsshd server with default the sftp client was also 10X faster for GET, and 40X faster for a PUT, so its worth installing on your server even if you don't control the client hosts.

For more information

       ESnet 'Lunch and Learn' talk by Chris Rapier