[CentOS] ssh-agent autostarting
jdmls at yahoo.com
Fri Aug 21 16:12:17 UTC 2009
> I'm trying to get public key authentication working on a client to
> server connection so i can drop passwords. I've got the keys in place and
> confirmed they are working. I'm now trying to set up ssh-agent, I read i can
> do it manually i was looking for a more automated method for users on login.
> This is not through a gui.
I use this personaly in my .bash_profile:
AGENTRUNNING=`ps x | grep agent | grep -v grep`
if [ -z "$AGENTRUNNING" ]; then
/usr/bin/ssh-agent -s > $HOME/.ssh/agent-env.sh
.. $HOME/.ssh/agent-env.sh > /dev/null
And then use ssh-add to add keys...
More information about the CentOS