add the following to your .bashrc, which starts ssh-agent on login.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
if [ -f ~/.agent.env ] ; then . ~/.agent.env > /dev/null if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then echo "Stale agent file found. Spawning new agent… " eval `ssh-agent | tee ~/.agent.env` ssh-add fi else echo "Starting ssh-agent" eval `ssh-agent | tee ~/.agent.env` ssh-add fi |
refer: http://stackoverflow.com/questions/112396/how-do-i-remove-the-passphrase-for-the-ssh-key-without-having-to-create-a-new-ke