Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh-agent + ssh-add problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
evilstrike
n00b
n00b


Joined: 21 Aug 2006
Posts: 7

PostPosted: Mon Aug 28, 2006 8:39 pm    Post subject: ssh-agent + ssh-add problem Reply with quote

Pretty straight forward,
I seem to have a problem where my box running ssh-add is releasing the public keys when the ssh connection is closed

I have 2 gentoo box.
BoxA and BoxB

BoxA has no trouble connecting with public key to BoxB (it does not prompt for passphrase as it is stored using ssh-agent). I can exit or create new ssh connection to BoxA and I will still be able to connect to BoxB without the passphrase (which is what I want)

But BoxB for some reason will work if I run eval `ssh-agent` followed by ssh-add followed by the passphrase. I will be able to login to BoxA with no further need of the passphrase untill I close the ssh session with BoxB. If I close the connection and start a new one on BoxB and try to connect to BoxA it will prompt for the passphrase (ssh-agent is still running). I seem to need to run ssh-add everytime I login to BoxB

Anyone knows why the passphrase gets wipe-out when I close the ssh connection that started ssh-agent on BoxB?

this only happens on BoxB and both box are running Gentoo
Back to top
View user's profile Send private message
Cuardin
l33t
l33t


Joined: 06 Feb 2003
Posts: 713
Location: vasastaden.stockholm.se

PostPosted: Tue Aug 29, 2006 11:15 am    Post subject: Reply with quote

Are you running keychain?
_________________
Part of "The adopt an unanswered post initiative"
Back to top
View user's profile Send private message
evilstrike
n00b
n00b


Joined: 21 Aug 2006
Posts: 7

PostPosted: Wed Aug 30, 2006 5:54 pm    Post subject: Reply with quote

im running ssh-agent and adding the key with ssh-add

I did the same on the other box and im not having this problem

ssh-agent is always running though. the process itself does not get killed. But I think the environment variables are getting clear and that might be why the key is not being kept.

I still have not solved this problem
Back to top
View user's profile Send private message
balarsen
n00b
n00b


Joined: 10 Jul 2005
Posts: 12
Location: Bozeman, MT USA

PostPosted: Wed Aug 30, 2006 6:08 pm    Post subject: Reply with quote

This is a truly annoying issue, I have fought with this on several occasions. I have found that if both machines are on gentoo this is about the easiet way to go.

The package net-misc/ssh-installkeys does what is shown on http://gentoo-wiki.com/SECURITY_SSH_without_a_password

then just use
Code:
/usr/bin/ssh-installkeys BoxB

and vise versa
Back to top
View user's profile Send private message
Cuardin
l33t
l33t


Joined: 06 Feb 2003
Posts: 713
Location: vasastaden.stockholm.se

PostPosted: Wed Aug 30, 2006 8:35 pm    Post subject: Reply with quote

If you want to use ssh-agent, I strongly recommend keychain. keychain is a small app written by some Gentoo developer that keeps thrack of your ssh-agents that and makes sure it has the correct ssh keys. I think it also handles pgp, but I don't use it so I don't know. Just install it and add the line as told in your ~/.bashrc and it works splendidly. Have been using it now for almost 3 years I think (2 at least) and it has never b0rked on me.
_________________
Part of "The adopt an unanswered post initiative"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum