[NTLUG:Discuss] Unattended ssh/scp/sftp transfers...
MadHat
madhat at unspecific.com
Tue May 21 17:15:23 CDT 2002
On Tue, 2002-05-21 at 17:02, Tom Woody wrote:
> I want to use SSH to automate some regular backups and am having the worst time at it...
>
> I have various hosts that I need to either retrieve files from, or perform backups
>
> I know that I can use ssh,sftp,scp,etc to do these-as I have done them...but there is no way I have found to handle the authentication for the automated tasks.
>
> 1) I have tried doing RSAAuthentication but since I need to do this in a crontab I can't use the ssh-agent to store the passphrase, and I haven't found a way to provide the passphrase as an argument to scp/ssh
> 2) I have tried using the SSH1 Rhosts authentication but that doesn't seem to want to work either
>
> Anyone have any other suggestions...I am all ears!
>
use a passphrasless key and the -I to specify the identify file.
so you create a key with ssh-keygen, but don't make it the defaul
identity file, use another name, the take the pub and add it to the
remote host, but add what can be run and where they can connect from use
the command and host directives in the authorized_keys file. Then you
can use cron by saying
scp -I identity_file user at host:file /local/path
if oyu need more details, let me know.
> --
> Woody
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
--
MadHat at Unspecific.com
gpg --keyserver wwwkeys.us.pgp.net --recv-keys 9DDC3E98
Key fingerprint = E786 7B30 7534 DCC2 94D5 91DE E922 0B21 9DDC 3E98
More information about the Discuss
mailing list