access keyring over ssh

Asked by Michael Nagel

i am trying to use gkeyring via ssh, but it does not work for me. this is how far i get:

$ ssh localhost
Enter passphrase for key '/home/nailor/.ssh/id_rsa':
Last login: Thu Sep 20 17:39:44 2012 from localhost
$ cd /tmp
$ python gkeyring.py
Xlib: extension "RANDR" missing on display "localhost:11.0".
GNOME keyring is not available!
$ ...

somehow gnome keyring (daemon(?)) does not seem to be running in that session? can i fix that? start it? ...?

thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
gkeyring Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Nagel
Solved:
Last query:
Last reply:
Revision history for this message
Michael Nagel (nailor) said :
#1

ps: localhost is of course only an example. in reality, i am working on a remote host.

Revision history for this message
Kamil Páral (kamil.paral) said :
#2

Hi, yes, gnome keyring daemon is not running (GNOME is not running at all), that's why you can't access the keyring. I am not sure whether you can fix that somehow. The purpose of this tool was always to allow CLI access to your keyring _inside a running GNOME session_.

You can try to start the daemon manually. If you find a way, let us know. Thanks.

Revision history for this message
Michael Nagel (nailor) said :
#3

I finally did it: The following works for me. I suggest you put it somewhere in your README:

eval $(dbus-launch --sh-syntax)
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
export $(gnome-keyring-daemon)
python -c "import gnomekeyring;import getpass;p=getpass.getpass();gnomekeyring.unlock_sync(None,p);"

cd /tmp && bzr branch lp:gkeyring
python /tmp/gkeyring/gkeyring.py --id 321

Revision history for this message
Michael Nagel (nailor) said :
#4

might be broken above, so here it is again: http://paste.debian.net/plain/199470

Revision history for this message
Michael Nagel (nailor) said :
#5
Revision history for this message
Michael Nagel (nailor) said :
#6