I'm using duplicity on debian wheezy, which comes with version 0.6.18 as standard package. I also tried version 0.6.24 from wheezy-backports.

I want to use sftp as backend, but if I run:

duplicity --full-if-older-than 1M --exclude /run --exclude /proc --exclude /lost+found --exclude /dev --exclude /sys --exclude /mnt / sftp://$FTP_USER"@"$FTP_HOSTNAME/myserver

I get the following error:

ssh: Exception: Incompatible ssh peer (no acceptable kex algorithm)
ssh: Traceback (most recent call last):
ssh:   File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1546, in run
ssh:     self._handler_table[ptype](self, m)
ssh:   File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1618, in _negotiate_keys
ssh:     self._parse_kex_init(m)
ssh:   File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1731, in _parse_kex_init
ssh:     raise SSHException('Incompatible ssh peer (no acceptable kex algorithm)')
ssh: SSHException: Incompatible ssh peer (no acceptable kex algorithm)

I've read that this is might related to the paramiko backend which is used as default, but when I change it to pexpect (...pexpect+sftp://...) I get this error:

UnsupportedBackendScheme: scheme not supported in url: pexpect+sftp://

How can that issue be fixed?

1 Answer 1


Try changing the command

duplicity /source-dir pexpect+sftp://backup.server.com/storage


duplicity /source-dir --ssh-backend=pexpect sftp://backup.server.com/storage

Tested with duplicity 0.6.24 on debian jessie 8.7

man duplicity:

--ssh-backend backend

Allows the explicit selection of a ssh backend. Defaults to paramiko.

Alternatively you might choose pexpect.

The scheme 'pexpect+sftp://' was introduced in a later version of duplicity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.