Hi John,
> I am trying to work out how I can use rsync with ssh but also
> specifying the
> key to use. I want to run rsync/ssh via cron but need to use
> different keys
> from the same account. With just ssh this is not a problem -
> the -o option takes care of it.
Which version of ssh is this? I use Unix ssh 1.2.x, and the option is -i. I
run rsync with
rsync -e"ssh -x -a -i IdFile"
(-x -a turns off unnecessary X11 and agent forwarding for speed in setting
up). If you want to specify the identity file as an option with -o, you need
to use -o IdentityFile=IdFile (or if you really like to play with quotes, -o
'IdentityFile IdFile').
Actually I use this so often that I have a wrapper script that allows the -i
option (and several others) to be specified directly and then builds its own
ssh command.
> However, I can find no option to rsync except perhaps by
> using '-e ssh'. Changing this to something like '-e "ssh
> -o'IdentityFile2
> ~/.ssh/newkey'"' doesn't work (yes, you need to escape some
> of the quotes).
What's this IdentityFile2 option? That's a new one to me.
> Setting the environment variable didn't seem to work either
> (I may have got
> things wrong, but it just didn't like it). It seems that
> rsync keeps seing
> the -o option (or rather the key I specify) and complaining
> about it.
Tim.
============================== cut here ==============================
Tim Adye, BaBar/DELPHI Groups, Particle Physics Dept., _ /|
Rutherford Appleton Laboratory, UK. \'o.O' Oop!
e-mail: [EMAIL PROTECTED] or VXCERN::ADYE (HEPNET/SPAN) =(___)= Ack!
WWW: http://hepwww.rl.ac.uk/Delphi/Adye/homepage.html U Thphft!