You are not logged in.

#1 2009-01-09 20:37:37

void.pointer
Member
From: Dallas, TX
Registered: 2008-07-30
Posts: 239

ssh-agent newbie questions

Hi,

I've currently got a script that uploads backup files once a day to a remote linux server which has the public key I generated using ssh-keygen. I currently have the private key since I am the connecting client. I'm very new to ssh-agent and I'm not really sure how it works despite all of the research I've been doing. It seems like any ssh-add's I do go away when I reboot my linux machine, thus preventing my backup script from working because a passphrase prompt occurs when scp is used.

How can I setup my linux machine to automatically run the ssh-agent daemon so that ssh can access my registered identities? In addition, why do my identities get reset when I reboot? Doesn't ssh-agent persist any identities I add via ssh-add?

Offline

#2 2009-01-09 20:40:17

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: ssh-agent newbie questions

ssh-agent is a process, it only stores a key while it's running, and hence another invocation (eg, after a reboot) will know nothing about your keys.  To add a key to ssh-agent, you need to enter its passphrase.  Another option is to take advantage of the "command" field in the authorized_keys file (described in the AUTHORIZED_KEYS FILE FORMAT section of the sshd manpage) and use a passphraseless key restricted to only receiving the results of your backup script.

Offline

Board footer

Powered by FluxBB