Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passphrase-free ssh sessions w/ GNOME?

Status
Not open for further replies.

dynamint

IS-IT--Management
Feb 24, 2003
9
US
I'm trying to connect to all of the servers I support via SSH on my Redhat 9 server (I'm using gnome-terminal and multi-gnome-terminal) without having to type my passphrase for each session. I've tried using keychain but haven't had much success. Red Hat's suggestion [ ] works for me sometimes, but not all the time.

Can anyone share how you're doing it?
 
Found the solution. ssh-agent is invoked by default via X, and in my setup, it becomes defunct after a period of time, causing future invocations of ssh-agent from behaving normally.

All I needed to do was disable the ssh-agent command from automatically starting during my login, then script it in from my .bash_profile. For Red Hat 9 running in graphical mode (runlevel 5) ssh-agent is invoked by the /etc/X11/xdm/Xsession script. I simply disabled the lines mentioning ssh-agent.

Keychain is a front-end for ssh-agent so I'm now loading this from my .bash_profile. It works great for this purpose:

/usr/bin/keychain ~/.ssh/id_dsa
source ~/.keychain/${HOSTNAME}-sh > /dev/null

Now I can open all the terminal sessions I want and ssh into all of my servers without the annoyance of submitting a passphrase each time.
 
dynamint,

Are the two lines you mentioned above in the .bash_profile the only lines you needed to get things working? I'm trying to do this under KDE in RH9.

Bluecrack
 
The key for me was disabling this line in /etc/X11/xdm/Xsession

# is ssh-agent available?
#SSHAGENT=
[ -x /usr/bin/ssh-agent ] && SSHAGENT="/usr/bin/ssh-agent"



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top