On 01-Dec-00 at 14:13:33 Adye, TJ (Tim) wrote:
>> 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"
>
Sorry, I should have said. I'm using openSSH 2.3.0p1 mainly, some systems
have the latest snapshot from the 29th (I think. There are some outstanding
problems and I'd like them sorted out, so I'm delving further into the code
to see if I can see anything. The problems are a bit nasty though :-( )
> (-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').
>
Yes, the '-o' option is what I use when invoking ssh from cron usually.
> 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.
>
Hmm, I'm trying to avoid 'wrappers'. I'd like to submit a (reasonably)
simple one line cron job that does what I want. (Probably what we all want
at least most of the time! :-) )
> What's this IdentityFile2 option? That's a new one to me.
>
It specifies the DSA key to use, as opposed to IdentityFile for RSA keys.
As said, using the option works fine; I just can't seem to use it with rsync.
The latest openSSH however I gather determines whether to use RSA/DSA by
looking at the keys, and so has to some extent gone back to generic options
like IdentityFile.
I'll have another attempt this afternoon to see if I'm doing something silly.
Thanks,
John.
------------------------------------------------------------------------
John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914
E-mail: [EMAIL PROTECTED]
PGP key available from public key servers