1

This used to work just fine until I had to change the server ip.

I can sftp to the server. I can also run a simple python code using paramiko to connect to sftp, and it works ok.

But when I run duplicity, it fails:

Duplicity error: BackendException: ssh connection to SERVER_IP:22 failed
('SERVER_IP', <paramiko.ed25519key.Ed25519Key object at 0x7f8fec54f710>,
paramiko.ed25519key.Ed25519Key object at 0x7f8fec53e4d0>)

I tried editing sshbackend.py, which on my distro is ssh_paramiko_backend.py, as explained here as a possible fix but didn't work.

The exact duplicity command is:

duplicity --full-if-older-than 1M [SOURCE] sftp://[USER]@[SERVER_IP] --volsize 666 --verbosity 8 --allow-source-mismatch

Password is being set on export FTP_PASSWORD=[pass]. I tried also to pass the password in the command, but I got the same error.

root@server:~# ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016

root@server:~# duplicity -V
duplicity 0.7.06

root@server:~# python -c "import paramiko; print paramiko.__version__"
2.2.0

3 Answers 3

0

does pexpect+sftp:// work? ..ede/duply.net

1
  • Nop, doesn't work.
    – rlcabral
    Nov 15, 2018 at 20:56
0

On destination server

Add the following line to /etc/ssh/sshd_config:

PubkeyAcceptedKeyTypes +ssh-rsa

Then restart sshd

systemctl restart sshd
0

If connecting to a SFTP backup via duplicityand you get the "No authentication methods available" error, make sure to use the paremeter --ssh-askpass for duplicity.

--ssh-askpass Tells the sftp/scp backend to use FTP_PASSWORD from the environment, or, if that is not present, to prompt the user for the remote system password. This password is also used for ssh keys that are passphrase-protected. Without this option the password is expected in the url.

https://linux.die.net/man/1/duplicity

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .