I missed the fact that in the first case you are doing sudo and in
the
second you are doing it as a normal use. It won't work that way.
Root
is its own user. You need to either set up root as a key on the
remote,
or in /root/.ssh/ add a 'config' file with the following lines.
IdentityFile /home/user/.ssh/id_rsa
IdentityFile /home/user/.ssh/id_dsa
where 'user' is your user name.
Actually, the host key detection refers to the checking of the remote
host key, rather than key authentication failures. I also missed the
sudo bit.
Original poster - does *root* have your remote host in
~/.ssh/known_hosts? That is, if you run the manual sftp command with
sudo (sudo sftp ....), do you get a host key warning? If so, supress
that warning by interactively accepting (assuming the key fingerprint
is correct of course), and then re-run duplicity. If it still gives
you trouble, verify that 'sudo sftp...' works without any kind of host
key related prompt.
To be clear, the prompt that is being checked for is this:
The authenticity of host 'localhost (127.0.0.1)' can't be established.
DSA key fingerprint is 09:c2:d4:ab:76:b4:04:4f:b5:b3:de:52:4c:7c:
80:d2.
Are you sure you want to continue connecting (yes/no)?
As long as you see that when manually running 'sudo sftp...',
duplicity will bail by design.