[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Backup script question...



On Tue, Jun 29, 2004 at 02:28:12PM -0500, Ken Keefe wrote:
> I wrote a very basic bash script that tars a set of critical files and
> then scp's the tar file to a server of mine. For right now it asks me
> for a password for the remote user and I enter it by hand. How can I
> accomplish this same sort of thing but in an automated fashion? I'd like
> to be able to add a cron job so it does this everyday at such and such
> time even when I am not around to feed it the password... for obvious
> security reasons, I'd rather not store my password in the script or some
> other file...

you need to put your public key (usually stored in ~/.ssh/id_rsa.pub) into
the authorized_keys file on the remote machine (usually stored in ~/.ssh/ of
the home directory for the remote user), this will use public key 
authentication and no longer prompt for a password

along these same lines you can use rsync with ssh to do backups (although they
won't be compressed)


hope this helps

Bob T. Kat, LPIC1

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.