integrating rsync with Rev
Sarah Reichelt
sarah.reichelt at gmail.com
Tue May 27 18:49:48 EDT 2008
On Wed, May 28, 2008 at 2:19 AM, Josh Mellicker <josh at dvcreators.net> wrote:
> Okay, here's where I'm stuck with using rsync and Rev for remote <-> local
> file transfers:
>
> The first time you run an rsync command with a certain server, you get this
> prompt from rsync:
>
> The authenticity of host 'revcoders.org (67.19.54.130)' can't be
> established.
> RSA key fingerprint is 9f:8c:ba:a9:5d:3f:b4:ef:f7:4a:2c:20:cd:77:b3:8c.
> Are you sure you want to continue connecting (yes/no)? yes
>
> Somehow, we either need to:
>
> 1. "expect" this possible response (the first time only) and answer "yes"
This script works for that, whether the fingerprint has already been
stored or not:
#!/usr/bin/expect -f
spawn rsync -avzrt
revcoder at revcoders.org:/home/revcoder/public_html/revcoder_rsync_test/
/revcoder_rsync_test
expect "connecting" { send "yes\n"}
expect "password:" { send "cookies\n"}
expect "#"
BTW, when testing this on my own site, I found that the "expect"
parameters are case sensitive. My web host sends "Password:" with
upper case "P" and I had to change the script to match.
>
> 2. or, would it be a better solution to check for the key fingerprint on the
> local machine and create it if necessary? Or, perhaps just create it
> temporarily and delete it at the end of the session for security purposes?
I found that the fingerprints are stored in ~/.ssh/known_hosts but it
is encoded. You can detect if the fingerprint already exists and I
guess you could delete it after every transaction.
Cheers,
Sarah
More information about the use-livecode
mailing list