Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] ssh key-based auth not working Ubuntu without GUI (X) login??

On Tue, 2011-08-23 at 09:57 +1000, Sonia Hamilton wrote:
> I've come across an interesting "feature" on the later Ubuntu's - ssh
> key-based authentication to a target box doesn't appear to work, unless
> I've logged onto the target box through the GUI (X).

Guessing here, hopefully a guess which starts you on the path to an

1) I'd use ls -l to check the contents and permissions of
you want
sonia:sonia -rw-------

You might want to look in /var/log/daemon.log on the target for the
messages from the ssh server.

2) When you log into GNOME that starts gnome-keyring-daemon. This
implements ssh-agent but looks into the GNOME keystores (which includes,
but is not limited to, ~/.ssh).  I do wonder if the ssh keys being used
by gnome-keyring-daemon and the ssh keys in ~/.ssh/id_* might be
different??? You might want to compare the fingerprints which are output
in ssh -v and in the system log. Maybe command line ssh and
gnome-keyring-agent are simply offering differing keys, only one of
which works.

 Glen Turner <http://www.gdt.id.au/~gdt/>