View previous topic :: View next topic |
Author |
Message |
evilstrike n00b
Joined: 21 Aug 2006 Posts: 7
|
Posted: Mon Aug 28, 2006 8:39 pm Post subject: ssh-agent + ssh-add problem |
|
|
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 |
|
|
Cuardin l33t
Joined: 06 Feb 2003 Posts: 713 Location: vasastaden.stockholm.se
|
|
Back to top |
|
|
evilstrike n00b
Joined: 21 Aug 2006 Posts: 7
|
Posted: Wed Aug 30, 2006 5:54 pm Post subject: |
|
|
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 |
|
|
balarsen n00b
Joined: 10 Jul 2005 Posts: 12 Location: Bozeman, MT USA
|
Posted: Wed Aug 30, 2006 6:08 pm Post subject: |
|
|
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 |
|
|
Cuardin l33t
Joined: 06 Feb 2003 Posts: 713 Location: vasastaden.stockholm.se
|
Posted: Wed Aug 30, 2006 8:35 pm Post subject: |
|
|
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 |
|
|
|