The easiest way is to generate keys with no passphrase.  it's still secure, as long as 
nobody can get your private key.  If you insist on adding a password, you'll have to 
keep it in plaintext in a file and reference it with --password-file, or if you 
want to add a layer of indirection to make it harder to steal the pass, come ujp with 
a routine that ends up putting the plain text of the password into the environmental 
variable$RSYNC_PASSWORD.  
Here's a quick rot13:
to save the pass
tr abcdefghijklmnopqrstuvwxyz nopqrstuvwxyzabcdefghijklm >encryptedpasswordfile
type the password and ^d
to get it back out
RSYNC_PASSWORD=`cat encryptedpasswordfile |tr nopqrstuvwxyzabcdefghijklm 
abcdefghijklmnopqrstuvwxyz`

Of course, if somebody reads your script, they've got the way to read the password 
file, if they can get it.
you might as well use passphraseless ssh keys (ssh-keygen)

Tim Conway
[EMAIL PROTECTED]
303.682.4917
Philips Semiconductor - Colorado TC
1880 Industrial Circle
Suite D
Longmont, CO 80501





[EMAIL PROTECTED]@[EMAIL PROTECTED] on 02/12/2001 09:14:26 AM
Sent by:        [EMAIL PROTECTED]
To:     [EMAIL PROTECTED]@SMTP
cc:      
Subject:        how to ssh in cron
Classification: 

How do I call rsync with -e ssh in a shell script run from cron.  SSH
requires a password.  How do I pass the password to it from the script?

V/r
Jay




Reply via email to