Re: Can cron jobs share ssh-agent?
From: Pierre Asselin (pa_at_invalid.invalid)
Date: 05/22/03
- Next message: Pierre Asselin: "Re: putty and host-listbox"
- Previous message: Ramon F Herrera: "Secure FTP server?"
- In reply to: Joe Harrison: "Can cron jobs share ssh-agent?"
- Next in thread: Joe Harrison: "Re: Can cron jobs share ssh-agent?"
- Reply: Joe Harrison: "Re: Can cron jobs share ssh-agent?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 21 May 2003 22:10:22 -0400
Joe Harrison <joe.harrison@teamware.antisp4m.co.uk> wrote:
>[ . . . ]
> But this is where everything comes unglued - although the cron task runs as
> same non-root user it appears to be unable to use the key, just gets "Bad
> passphrase. Permission denied." The OpenSSH documentation implies that
> separate tasks for same user *will* be able to share ssh-agent access.
Your cron job needs an environment variable in order to find the
agent. It'll look like this:
SSH_AUTH_SOCK=/tmp/ssh-XXBGVg2b/agent.919
What you could do is store it in a file owned by user:user with permission
0600 after you start the agent, and read that file at the beginning of
your cron job to set the environment.
Just leaving the agent behind you isn't too good for your security though.
Even without the file an attacker who cracks the account can find the
socket, get the private key from the agent and break into the backup
server.
> [ ... ] BTW yes I know it
> would work if I used a key with no passphrase, unfortunately my boss might
> find out...
Right. Are you bypassing policy by not entering a passphrase to
authenticate yourself when you do your backup? Just asking, I don't
know what your site's policy is.
- Next message: Pierre Asselin: "Re: putty and host-listbox"
- Previous message: Ramon F Herrera: "Secure FTP server?"
- In reply to: Joe Harrison: "Can cron jobs share ssh-agent?"
- Next in thread: Joe Harrison: "Re: Can cron jobs share ssh-agent?"
- Reply: Joe Harrison: "Re: Can cron jobs share ssh-agent?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|