Mailinglist Archive: opensuse (2912 mails)

< Previous Next >
how to make ssh-agent persistant
I am trying to make ssh-agent active each time I log in. I usually log in
via ssh. I would like to know where I should put the info ssh-agent
generates to make this happen. Does it go in .bashrc? .profile? Also how do
you kill it when you log out?

For setup, I run

david@skyline:~> ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-spZ10483/agent.10483; export SSH_AUTH_SOCK;
echo Agent pid 10484;

Well actually it's

david@skyline:~> eval `ssh-agent`

When I exit the ssh session, then login again a ps ax shows ssh-agent still
alive, but ssh-add can't connect to the server so I end up having to kill
the active ssh-agent(s) and eval `ssh-agent` to get it going again. I then
have to ssh-add again to load the keys.

How do I automate this to make it permanent?

Any wisdom would be appreciated.

David C. Rankin, J.D., P.E.
510 Ochiltree Street
Nacogdoches, Texas 75961
(936) 715-9333
(936) 715-9339 fax

< Previous Next >