GNOME Bugzilla – Bug 568852
SSH keys not refreshed properly
Last modified: 2009-01-31 00:29:09 UTC
[ Original report from Sébastien Villemot : http://bugs.debian.org/508332 ] When I go to the "Properties" dialog box of my personal SSH key, seahorse refuses to let me tick the checkbox entitled "The owner of this key is authorized to connect to this computer". In other terms, seahorse refuses to copy the content of ~/.ssh/id_rsa.pub into ~/.ssh/authorized_keys. When I do the copy manually, the checkbox becomes ticked in seahorse. I can untick it, but I will then be unable to tick it again.
This occurs because ssh key refreshing isn't implemented currently. /* TODO: Need to work on key refreshing */ SEAHORSE_OBJECT_CLASS (seahorse_ssh_key_parent_class)->refresh (sobj); What this means is that the key is being authorized and the authorized_keys file is being updated correctly, but after the update the key is refreshed, but the new authorized status isn't read in from the file and the ssh key properties dialog is "updated" with the unauthorized status which causes the "toggled" signal to be sent which removes the key from authorized_keys. I'll look at how gpg keys are refreshed and see if I can fix this, but it might require Stef's attention.
Hmmm, in my case the key isn't being added to authorized_keys at all. I'll look at this problem first and then see about the refreshing.
I recommend a break point at seahorse-ssh-key-properties.c:164 to observe the behavior I did.
I committed a fix for this problem. Turned out that simply blocking the "toggled" signal when updating the toggle-button did the trick. As far as the refresh, the reason this works, is because when any file changes in ~/.ssh all the SSH keys are refreshed. So although the actual public key refresh isn't implemented, it gets refreshed 500 ms or so later.