4

I have two linode VPS accounts and I want to back up one onto the other (the reasons are mainly for fun and to practice server administration.)

the short version

Duplicity isn't even asking for my password, but immediately says "invalid SSH password" (but I can ssh into the other server). why?

the long version

When I run duplicity /home/me scp://root@x.x.x.x//root/backup I get

Invalid SSH password
Running 'sftp  root@x.x.x.x' failed (attempt #1)
Invalid SSH password
Running 'sftp  root@x.x.x.x' failed (attempt #2)
Invalid SSH password
Running 'sftp  root@x.x.x.x' failed (attempt #3)

And it says Invalid SSH password immediately with no opportunity for me to actually type the password.

When I type duplicity full -v9 --num-retries 4 /home/me scp://root@x.x.x.x//root/backup I get

Main action: full
Running 'sftp  root@97.107.129.67' (attempt #1)
State = sftp, Before = 'Connecting to 97.107.129.67...
root@97.107.129.67's'
State = sftp, Before = ''
Invalid SSH password
Running 'sftp  root@97.107.129.67' failed (attempt #1)

I can ssh into root@x.x.x.x fine, and in fact have the ip in known_hosts before I tried any of this. serer 1 (from which I'm running the duplicity command) is Linode's default Ubuntu 8 setup with only a handful of programs installed via apt-get. server 2 (represented by x.x.x.x) is literally only Linode's default Ubuntu 8 setup

I previously tried using SystemImager -- would that have changed settings in a destructive way? (I have removed and rebooted since then)

Isn't Duplicity supposed to prompt for password? Am I using it wrong? are there common mistakes/dependencies I need to know about? Is there any way that x.x.x.x could be setup that could make this not work (I used Linode's default Ubuntu 8 setup and barely )?

Alexander Bird
  • 431
  • 2
  • 7
  • 14

2 Answers2

5

from duplicity(1)

--ssh-askpass Tells the ssh/scp backend to use FTP_PASSWORD from the environment, or, if that is not present, to prompt the user for the remote system password.

Aleksandar Ivanisevic
  • 3,377
  • 21
  • 24
  • Thanks! If this command is required for scp:// protocol to work, then why are there no examples that use it? what other way is there to use scp:// and not require --ssh-askpass such that no one uses it in examples. Would the fact I'm not on a LAN make a difference? – Alexander Bird Apr 17 '10 at 23:17
  • and by examples, I'm including the first one on the man page that also doesn't have the FTP_PASSWORD env var or --ask-pass. how does their example ever work? – Alexander Bird Apr 17 '10 at 23:24
  • you can use ssh with public key authentification (http://sial.org/howto/openssh/publickey-auth/). If you have a pasphraseless private key, you will never be asked for a password. – Aleksandar Ivanisevic Apr 19 '10 at 12:32
1

Just FYI: I have seen duplicity fail with the "Invalid SSH Password" when, in fact, the problem was that the directory it was trying to SFTP to simply didn't exist.

(I had left out a slash after user@host, i.e. I had done scp://user@host/mnt/backups when I needed scp://user@host//mnt/backups.)

Quentin
  • 11
  • 1