Re: Can cron jobs share ssh-agent?
From: Nico Kadel-Garcia (nkadel_at_verizon.net)
Date: 05/21/03
- Next message: Neil W Rickert: "Re: Can cron jobs share ssh-agent?"
- Previous message: Joe Harrison: "Can cron jobs share ssh-agent?"
- In reply to: Joe Harrison: "Can cron jobs share ssh-agent?"
- Next in thread: Neil W Rickert: "Re: Can cron jobs share ssh-agent?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 21 May 2003 11:56:58 GMT
Joe Harrison wrote:
> I currently have a daily remote backup operation which involves manually
> executing a *nix command line call to "rsync", which in turn depends on SSH
> as an underlying transport to do its thing.
>
> When rsync starts up and tries to make its SSH1 connection it naturally
> pauses during the connection setup to prompt me to give the passphrase for
> the client key. To avoid having to type in the passphrase every day I store
> it once in ssh-agent and so long as I don't ever logout (the server console
> is heavily secured physically) I can basically run my daily backup merely by
> bash's "up-arrow" giving me the same command line again.
>
> However even typing up-arrow / return every day can be too arduous for us
> notoriously bone-idle lollygagging sysadmins :) and I would really like to
> run it completely unattended as a cron job.
>
> 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.
Yeah, you can use ssh-agent. You have to make sure it's got your key
information stashed somewhere that the other session can find it and use
it, such as starting ssh-agent and running "set | grep SSH >
savefile.txt", then with the other script running something like ".
savefile.txt"
> If anyone has ever got past a similar situation I would be pleased to hear
> how they did it. I'm using Red Hat 8 with OpenSSH_3.4p1. BTW yes I know it
> would work if I used a key with no passphrase, unfortunately my boss might
> find out...
Agreed. Do you really need this, or can you use "rsync" correctly
configured to allow one machine to *pull* the data appropriately?
- Next message: Neil W Rickert: "Re: Can cron jobs share ssh-agent?"
- Previous message: Joe Harrison: "Can cron jobs share ssh-agent?"
- In reply to: Joe Harrison: "Can cron jobs share ssh-agent?"
- Next in thread: Neil W Rickert: "Re: Can cron jobs share ssh-agent?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|