Well, after searching and asking and digging around in the code I have
finally got things working as I believe they should work.
That is I have a default keyring being automatically opened for me
when I log in. It took me a while because firstly there isn't much
documentation telling you how you're supposed to use it and secondly
because (in xubuntu 9.10 at least) it's broken so it doesn't work even
if you do things right.
There are two problems:-
1 - By default ssh-agent gets started as well as gnome-keyring-daemon,
as they're both trying to do the same thing this isn't a good idea.
I've stopped ssh-agent being started automatically by deleting the
use-ssh-agent line from /etc/X11/Xsession.options. I'm sure there
should be a GUI way of changing this but I don't know what it is.
2 - Although gnome-keyring-daemon is started automatically it isn't
set up to listen on the ssh socket. To fix this I have added the
following to my .xprofile:-
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
export GNOME_KEYRING_SOCKET
This second is definitely a bodge but at least it gets things
working, there are several bugs reported around this area in more
than one linux distribution - in fact that's how I eventually
found out how to sort it out.
So, now my login password is *also* used to unlock the default keyring
and ssh can interrogate that keyring to get my private key to log in
to other systems. .... and it really is just about passwordless, or
at least I don't have to enter any more passwords after login, but my
private keys are kept reasonably safe.
I suppose having my login password the same as my key passphrase is a
bit less than perfect but this is only for connections going outwards
from my home system so isn't very critical really.
Now I'm off to those external systems to make them a bit more secure
as regards logging into the home system. It's a pity there aren't any
'hooks' in ssh-agent and login that would allow you to do the same for
direct ssh logins as happens with Gnome/KDE, then you could do the
same sort of thing and enter only one password for connecting onwards.
--
Chris Green