Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] ssh-agent and ssh-add problems
View unanswered posts
View posts from last 24 hours

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


Joined: 16 Mar 2008
Posts: 9

PostPosted: Wed Apr 09, 2008 4:33 pm    Post subject: [solved] ssh-agent and ssh-add problems Reply with quote

Hey, i think i have a problem with ssh-agent and ssh-add

it appears as follows:
Quote:
serv .ssh # ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-aoAREl1818/agent.1818; export SSH_AUTH_SOCK;
SSH_AGENT_PID=1819; export SSH_AGENT_PID;
echo Agent pid 1819;


it looks like it runs ok but

Quote:

serv .ssh # ssh-add
Could not open a connection to your authentication agent.


and finally killing ssh-agent says
Quote:

serv .ssh # ssh-agent -k
SSH_AGENT_PID not set, cannot kill agent


the socket looks like it is in place
Quote:

serv .ssh # ls /tmp/ssh-aoAREl1818/agent.1818

do you have any ideas what am i doing wrong ... ?


Last edited by hooliz on Thu Apr 10, 2008 1:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Veteran
Veteran


Joined: 06 Mar 2007
Posts: 2595

PostPosted: Wed Apr 09, 2008 9:45 pm    Post subject: Reply with quote

You are starting the agent incorrectly. It prints out the shell commands necessary to set up the environment for future programs to find the agent. Since you did not set those environment variables, subsequent programs, including ssh-agent -k, cannot find the original agent to interact with it. As noted in the manual, you should start it with eval `ssh-agent` so that the output is used to update your environment.
Back to top
View user's profile Send private message
hooliz
n00b
n00b


Joined: 16 Mar 2008
Posts: 9

PostPosted: Thu Apr 10, 2008 1:24 pm    Post subject: Reply with quote

yep you were right i tried it with 'ssh-add' instead `ssh-add` that's what confused me.... thanx
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 - 5 Hours
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