I am trying to run duplicity to backup our dataserver to an external server over sftp. My command is as follows:

duplicity --no-encryption /home/dataserver sftp://user@host --ssh-askpass

When i run this i get errored with:

BackendException: ssh connection to user@host failed: No such file or directory: '/home/user/.ssh/known_hosts'
  • 1
    try to run only ssh user@host to create missing file – Romeo Ninov Dec 6 '18 at 10:15

Let's create and fill this file.

Run these commands from user you will run duplicity, for example from dataserver (If your user is already dataserver, then skip first step):

sudo -u dataserver -i
mkdir -m 0700 -p ~/.ssh
ssh-keyscan your-host.example.com >> ~/.ssh/known_hosts

P.S.: It looks like you run duplicity from user account user, so skip first step.

| improve this answer | |

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.