You are not logged in.

#1 2008-09-12 17:39:17

aneiser
Member
Registered: 2008-07-21
Posts: 59

[SOLVED] ssh-add/ssh-agent broken after hibernate with tuxonice

Hej all,
I experience a strange problem with ssh-agent and ssh-agent after waking up from hibernate, First some facts about my system (request more if you need ;):

andi@hbar> uname -a                        
Linux hbar 2.6.25-tp #1 SMP PREEMPT Mon Jul 21 14:41:07 CEST 2008 i686 Intel(R) Pentium(R) M processor 1.70GHz GenuineIntel GNU/Linux

It's the kernel from AUR with tuxonice support and APS support (a feature of my IBM ThinkPad R51). yaourt -Syu --aur is up-to-date.

Now before the hibernate everything works fine (I just test that with ssh-add in a shell and all the other nice ssh stuff works):

andi@hbar> ssh-add                                                     
Enter passphrase for /home/andi/.ssh/id_dsa: 
Identity added: /home/andi/.ssh/id_dsa (/home/andi/.ssh/id_dsa)

And the system looks like this:

andi@hbar> ps ax | grep ssh                             
26506 ?        Ss     0:00 /usr/bin/ssh-agent -- /usr/bin/gnome-session
28518 pts/1    R+     0:00 grep ssh
andi@hbar> ll /tmp | grep -P '(ssh|key)'               
drwx------  2 andi   users 4,0K 11. Sep 14:58 keyring-AbXhoE/
drwx------  2 andi   users 4,0K 12. Sep 19:11 keyring-LAO1Ek/
drwx------  2 andi   users 4,0K 12. Sep 19:11 ssh-yGVYA26489/
andi@hbar> printenv | grep SSH
SSH_ASKPASS=/usr/lib/ssh/gnome-ssh-askpass2
SSH_AUTH_SOCK=/tmp/keyring-LAO1Ek/ssh
SSH_AGENT_PID=26506

So, now I'm doing the hibernate (yes I really did a hibernate at this point and it worked ;) and repeating the steps:

andi@hbar> ssh-add
Could not open a connection to your authentication agent.

This is obviously not working, and neither does the other stuff.
But, the rest seems ok:

andi@hbar> ll /tmp | grep -P '(ssh|key)'       
drwx------  2 andi   users 4,0K 11. Sep 14:58 keyring-AbXhoE/
drwx------  2 andi   users 4,0K 12. Sep 19:11 keyring-LAO1Ek/
drwx------  2 andi   users 4,0K 12. Sep 19:11 ssh-yGVYA26489/
andi@hbar> ps ax | grep ssh   
26506 ?        Ss     0:00 /usr/bin/ssh-agent -- /usr/bin/gnome-session
29641 pts/1    S+     0:00 grep ssh
andi@hbar> printenv | grep SSH   
SSH_ASKPASS=/usr/lib/ssh/gnome-ssh-askpass2
SSH_AUTH_SOCK=/tmp/keyring-LAO1Ek/ssh
SSH_AGENT_PID=26506

So, what the hell happened to my socket? It seems that the hibernation breaks something! Any help is appreciated, even some tips how to get more verbose messages from ssh-add would be nice. Of course, when I logout from my Gnome session and relogin again, everything works fine again!
Thanks in advance!

Last edited by aneiser (2008-09-14 10:05:23)

Offline

#2 2008-09-12 19:34:53

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: [SOLVED] ssh-add/ssh-agent broken after hibernate with tuxonice

Maybe the hibernation clears /tmp? That would remove the socket file.

Offline

#3 2008-09-12 19:42:52

aneiser
Member
Registered: 2008-07-21
Posts: 59

Re: [SOLVED] ssh-add/ssh-agent broken after hibernate with tuxonice

Daenyth wrote:

Maybe the hibernation clears /tmp? That would remove the socket file.

Hmm, as I posted it, the

 ls -lah /tmp

command showed the same contents before and after the hibernate. Is the some way to "test" whether the socket file is still working after the hibernate?

Offline

#4 2008-09-14 10:04:57

aneiser
Member
Registered: 2008-07-21
Posts: 59

Re: [SOLVED] ssh-add/ssh-agent broken after hibernate with tuxonice

Here:
https://bugs.launchpad.net/ubuntu/+sour … bug/220165
Is something similar described, and the tip there seemed to work, just change

/apps/gnome-power-manager/lock/gnome_keyring_hibernate

in gconf-editor from true to false!

Offline

Board footer

Powered by FluxBB