[CentOS] ssh-agent autostarting

Fri Aug 21 16:12:17 UTC 2009
John Doe <jdmls at yahoo.com>

>     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
fi
.. $HOME/.ssh/agent-env.sh > /dev/null

And then use ssh-add to add keys...

JD