>>>>> "JR" == Joe Rice <[EMAIL PROTECTED]> writes:
[...]
JR> the problem at hand now is when using cron execute a rsync/ssh2
JR> command i can't figure out how to include the -o 'BatchMode yes'
JR> flag. this is what i'm trying;
JR> rsync -az --rsh="/usr/local/bin/ssh2 -o 'BatchMode yes'" --delete /web
remotehost:/
JR> FATAL: Connecting to yes' failed: No address associated to the
JR> name unexpected EOF in read_timeout
JR> any help would be appreciated.
rsync does not invoke a shell to process the --rsh option. It only splits
on whitespace and takes no account of quoting when constructing the argv
for the remote shell process. You can see this in main.c function
do_cmd()
[...]
for (tok=strtok(cmd," ");tok;tok=strtok(NULL," ")) {
args[argc++] = tok;
}
[...]
Thus ssh2 gets invoked with
args[0]="/usr/local/bin/ssh2";
args[1]="-o";
args[2]="'BatchMode";
args[3]="yes'";
which is why the ssh2 process tries to connect to "yes'" - and fails for
obvious reasons.
I don't have an SSH2 client to check against but the SSH1 client I have
allows you to specify options as "option=value". You could therefore try
invoking
rsync -az --rsh="/usr/local/bin/ssh2 -o BatchMode=yes" --delete /web remotehost:/
Note that I have also removed the single quotes. If this still fails you
may be forced to write a oneliner shell script that execs ssh2 with the
options you need and then use the shell script with the --rsh option.