Comment 3 for bug 347594

Revision history for this message
Christoph Leuzinger (leuzi-trash) wrote :

Thanks for your feedback!

ad 1.: That should be pretty straightforward. I somehow failed to notice the ConfigFolder class when creating the ConfigFile class.

ad. 2., 3.: I consider these to be some of the "rough edges". Thanks for pointing it out, though.

Concerning the overall approach: I'm not sure if the best method to determine the SSH authentication method is to go with trial and error. There are quite a number of possibilities, some of which are:

a) There is no identity file on the source host. This is straightforward: use authentication by password.

b) There is an identity file on the source host, but no public key on the target host. This would be covered by the duplicity modification you propose.

c) There is more than one identity file on the source host, and/or their location in the file system is not necessarily known a priori. In this case, there is no need to use password authentication, but to ask the path to the identity file to be used.

You might argue that case c) is not very common, but I think it's important to keep the authentication methods that SSH provides, and it does provide the -i flag.

Generally I don't like the idea of guessing the right authentication method, as this is something that I want to control strictly. Also I don't think the SSH preferences get too complicated. Users might get confused about the identity file path, but if it contains a sensible default value (which can be guessed, if you like :-)), I think this shouldn't be much of a problem. They're using SSH after all.