Thanks for this info!

You should also post this on the Ubuntu bug - cause I know I'm going to
forget this in a few weeks, then look at the bug again :-)

~Craig

> According to Ubuntu Forum post
> http://ubuntuforums.org/showthread.php?t=682608) it looks that the
> import is carried out automatically when _both_ id_rsa and id_rsa.pub
> are present in the .ssh folder.
>
> I was solving a similar problem and the key just popped out in Seahorse
> when I added the public key. Private key alone is apparently not enough.
> Maybe that is because in .pub is actually saved the key comment.
>
> So I just did ssh-keygen -y to generate public one, pasted it into
> gedit, saved as id_rsa.pub and it just works.
>
> BTW, I guess that MIME types doesn't really play a role. For me, in
> nautilus, id_rsa gets detected as type "Dokument VHDL (text/x-vhdl)" and
> id_rsa.pub as "Prostý textový dokument (Plain text document)
> (text/plain)" ;-)
>
> --
> id_rsa not detected as x-pem-key
> https://bugs.launchpad.net/bugs/397145
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “seahorse-plugins” package in Ubuntu: New
>
> Bug description:
> Binary package hint: seahorse-plugins
>
> I'm trying to make gnome-keyring work as my SSH key forwarding agent
> properly but I've run into trouble with how my public key is detected. It
> seems to be the case that gnome-keyring will automagically recognize any
> file matching ~/.ssh/id_rsa or ~/.ssh/id_dsa if they are properly detected
> as supported mime types. Regardless of why I'm trying to do this, the fact
> is that ~/.ssh/id_rsa is detected as type application/octet-stream.
>
> I've tried my best to track down the problem but everything seems to be
> configured correctly. The shared-mime-info stuff for seahorse is found in
> /usr/share/mime/packages/seahorse.xml (which belongs to seahorse-plugins).
> It clearly should be catching my id_rsa file as type
> application/x-pem-key:
>
>   <mime-type type="application/x-pem-key">
>     <magic priority="90">
>       <match type="string" value="-----BEGIN RSA PRIVATE KEY-----"
> offset="0"/>
>       <match type="string" value="-----BEGIN DSA PRIVATE KEY-----"
> offset="0"/>
>       <match type="string" value="-----BEGIN ENCRYPTED PRIVATE KEY-----"
> offset="0"/>
>     </magic>
>   </mime-type>
>
> My private key file starts exactly as that mime-type definition says it
> should. Here's an octal dump of the top of that file:
>
> $ od -a id_rsa
> 0000000   -   -   -   -   -   B   E   G   I   N  sp   R   S   A  sp   P
> 0000020   R   I   V   A   T   E  sp   K   E   Y   -   -   -   -   -  nl
> 0000040   P   r   o   c   -   T   y   p   e   :  sp   4   ,   E   N   C
> 0000060   R   Y   P   T   E   D  nl   D   E   K   -   I   n   f   o   :
> 0000100  sp   D   E   S   -   E   D   E   3   -   C   B   C   ,   2   7
> 0000120   B   C   9   D   4   5   E   E   5   2   3   3   E   D  nl  nl
> ...
>
> I even copied the string out of the XML file and pasted it at the top of
> my id_rsa file. This had no affect on how the file is detected:
>
> $ xdg-mime query filetype id_rsa
> application/octet-stream
>
> An extra test:
> $ cat > test
> -----BEGIN RSA PRIVATE KEY-----<ctrl-D>
> usern...@host:~/.ssh$ xdg-mime query filetype test
> application/octet-stream
>
> What exactly is broken about this mime type rule? If the mime type were
> detected properly then it would automatically get associated with seahorse
> if I try to open it. I'd also be able to import it into seahorse. This
> bugs me.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/seahorse-plugins/+bug/397145/+subscribe
>

-- 
id_rsa not detected as x-pem-key
https://bugs.launchpad.net/bugs/397145
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to seahorse-plugins in ubuntu.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to