GNOME Bugzilla – Bug 641376
Two attempts required to save passphrase, SSH from file manager
Last modified: 2011-09-07 19:41:23 UTC
Using gnome-keyring 2.91.4, from Fedora's GNOME 3 Alpha test day. Steps to reproduce: 1. Open file manager 2. Choose Connect to Server 3. Type in a new IP address, and select SSH for connection type 4. Provide folder name (/home/<user> in this case) 5. Provide user name and passphrase, select Save password. SSH fingerprint dialog appears as expected, connection is OK. But upon trying again, when I only provide a user name, the connection does not succeed. I have to enter the passphrase again with Save password enabled for the keyring to save the credentials. Following the second attempt, the keyring appears to work correctly.
nautilus-2.91.8-4.fc15.x86_64
From the description, I believe this is a gvfs problem. It appears to me that the ssh mount code isn't properly saving the passphrase in the keyring when the fingerprint dialog is involved. Let me know if my diagnosis seems incorrect.
You might be using two different URIs - e.g. sftp://localhost/ (specifying the username later in GtkMountOperation dialog) and sftp://user@localhost/ makes a big difference. So you might end up having two records in keyring. Best way to check is via Seahorse or by looking at the Nautilus address bar. Please confirm my hypothesis.
I was careful to enter exactly the same information in the dialog in both attempts. Will retry with a newer GNOME 3 build shortly to confirm the problem.
(In reply to comment #4) > I was careful to enter exactly the same information in the dialog in both > attempts. Will retry with a newer GNOME 3 build shortly to confirm the > problem. Yeah, that's a different issue - just that user not directly encoded in the URI is treated like a separate case. In your original test case, did you go through the Connect to Server dialog again or did you use a bookmark (if you ever created one)?
I went through the Connect to Server dialog again. I didn't create a bookmark.
Confirming the original issue, reproducible here with gvfs-1.8.0-1.fc15, libgnome-keyring-3.0.0-1.fc15, gnome-keyring-3.0.0-1.fc15 and nautilus-3.0.0-1.fc15. Fingerprint confirmation dialog wasn't involved in my case, a record already exists in known_hosts. So much for comment 2. Before the test I removed all keyrings, removed ~/.gnome2/keyrings altogether. Then logged in. gnome-keyring-daemon was properly initialized, "login" keyring autocreated. Looks to me like nautilus-connect-server problem: 1. if the login succeeds on the first try, it doesn't save the password 2. if I don't provide a password, error is reported and the second try finally saves the password. Going to look at this more, on Monday.
Created attachment 186038 [details] [review] proposed patch
Thanks this looks fine. I pushed it to master now.