GNOME Bugzilla – Bug 351392
Lack of SSH keys in know_hosts causes AccessDenied exception
Last modified: 2006-08-15 15:37:37 UTC
<code> $ mv .ssh/ .ssh.old/ $ python >>>import gnomevfs >>> gnomevfs.get_file_info( "ssh://aigarius:password@aigarius.com/home/aigarius" ) Traceback (most recent call last):
+ Trace 70465
>>> $ ssh aigarius.com The authenticity of host 'aigarius.com (85.254.216.40)' can't be established. RSA key fingerprint is 6d:29:c0:f3:d0:84:c9:a9:d9:4c:7e:e3:1a:18:a2:e2. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'aigarius.com,85.254.216.40' (RSA) to the list of known hosts. aigarius@aigarius.com's password: ******* [...] aigarius.com$ exit $ python >>>import gnomevfs >>> gnomevfs.get_file_info( "ssh://aigarius:password@aigarius.com/home/aigarius" ) <gnomevfs.FileInfo 'aigarius'> >>> </code> There is no way to solve that exception inside the software interface. There must be a way to at least override that or get a better error. I am developing SBackup - a personal remote backup solution and people complain of this bug very frequently. Those people do not want to go to other pieces of software to get it to work for this server. They want SBackup just to do the right thing and work out of the box.
Thanks for your bug report! We're really proud that you're developing an application with GnomeVFS! Please give feedback for all issues you encounter, esp. bad documentation. In a C application, using gnome_authentication_manager_init() from libgnomeui before accessing GnomeVFS is enough to make this work as expected. You can use a python wrapper around libgnomeui's authentication manager initialization function and depend on it. Now, your users will be asked for confirmation just like with the traditional CLI. Note that you can also reimplement all the callbacks without depending on the libgnomeui (ergo bonobo) stack, cf. libgnomeui/gnome-authentication-manager.c.