Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
keychain / ssh-agent and kde
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
pathwalker
n00b
n00b


Joined: 18 Jul 2003
Posts: 26

PostPosted: Thu Oct 23, 2003 8:43 pm    Post subject: keychain / ssh-agent and kde Reply with quote

I gather from reading other posts, that others have had this problem -- but no one seems to have an answer, at least as far as I can see...

when I try to use ssh-agent under kde, it launches as one would expect, but
Code:
ssh-add
generates this output: (I'll include the ssh-agent command to you can see it really is running)...

Code:
bash-2.05b$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-ofjr7511/agent.7511; export SSH_AUTH_SOCK;
SSH_AGENT_PID=7512; export SSH_AGENT_PID;
echo Agent pid 7512;
bash-2.05b$ ssh-add
Could not open a connection to your authentication agent.


keychain appears to work -- that is, it starts the agent and asks me for my passphrase. However, when I try to ssh to a host that I know accepts my private key (works from red hat 9, for example), it still prompts me for my passphrase. Is there some freaky problem between kde and ssh-agent?
Back to top
View user's profile Send private message
esammer
Retired Dev
Retired Dev


Joined: 05 Apr 2003
Posts: 155
Location: NY, US

PostPosted: Fri Oct 24, 2003 9:10 am    Post subject: Reply with quote

While I do not use KDE, I do use ssh-agent (cvs development via ssh == typing passwords five billion times without it) all day everyday.

My current setup is just fluxbox, but the "secret" to ssh-agent is that the environment variables SSH_AGENT_PID and SSH_AUTH_SOCK need to be exported into the environment prior to ssh-add's execution. Here's a simple trick that works: put ssh-agent in your user's $HOME/.xinitrc file so when you run startx, ssh-agent is run PRIOR to kde starting thus the environment is setup properly. I have a feeling that whatever kde does, it doesn't establish and export the environment properly.

For reference, here's my .xinitrc:

Code:
ssh-agent fluxbox


...which runs ssh-agent and 'fluxbox' as the process that inherits the environment.

This *should* work even in a desktop environment like KDE or Gnome.

HTH.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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