After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 568852 - SSH keys not refreshed properly
SSH keys not refreshed properly
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: 2.26.0
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2009-01-23 14:57 UTC by Josselin Mouette
Modified: 2009-01-31 00:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Josselin Mouette 2009-01-23 14:57:11 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.
Comment 1 Adam Schreiber 2009-01-23 16:07:51 UTC
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.
Comment 2 Stef Walter 2009-01-30 21:52:31 UTC
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. 
Comment 3 Adam Schreiber 2009-01-30 23:34:37 UTC
I recommend a break point at seahorse-ssh-key-properties.c:164 to observe the behavior I did.
Comment 4 Stef Walter 2009-01-31 00:29:09 UTC
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.