The ssh & sftp destinations transfer files to an ssh server. Public/private key certificates must be setup on the ssh server so that the userid running HashBackup can connect to the server without a userid or password. For more information about how to setup keys, search the web for "passwordless ssh".

ssh vs sftp Destination Type

If the destination type is sftp, only the local sftp command is used to connect to the remote server. sftp has 2 limitations: a) selective download (downloading part of a remote file) is not supported; b) upload rate limiting is not supported.

If the destination type is ssh, the local ssh, sftp, and scp commands are used for remote operations, and the dd command is used on the remote server. Selective download is supported when type is ssh, allowing a much more efficient use of download bandwidth when restoring smaller amounts of data, especially if large arc files are used. Also, the rate keyword is supported with ssh destinations to limit upload bandwidth.

To debug sftp destination problems, make sure sftp works from the command line first, without needing a password. After starting sftp under the same userid HB will be using, try the cd, mkdir, ls -l, get, rm, rename, and put commands. If they all work, HashBackup should work. mkdir is only used when cd fails, usually because the dir directory doesn’t exist on the remote system.

To debug ssh destination problems, make sure you can ssh to the remote server without a password, test that sftp works as above, and that scp can be used to upload files.

dest.conf Keywords

type (required)

Either ssh or sftp


Optional, defaults to the userid running HB


Optional, defaults to 22


Files are normally created in the initial login directory on the ssh server. When multiple backups use the same ssh credentials, the dir keyword can be used and its value is prepended to all filenames. The directory is created on the ssh server if it doesn’t already exist.


Optional, higher integer values display more debug messages.


This optional keyword allows passing ssh options to the sftp program. For available options, see man ssh_config. The example below uses an alternate private key file and enables extra debug messages. If there are spaces in any option values, quote the value as you would on the command line.


destname myssh
type ssh
userid jim
port 22
dir mybackupdir
debug 2
args -oIdentityFile=~/.ssh/otherid -oLogLevel=debug