rsync --rsh not reading .ssh/config
Bill Moseley
moseley at hank.org
Thu Nov 11 18:48:37 GMT 2004
I've setup up a single-use key on a remote host to run rsync in server
mode. I've also setup .ssh/config locally with an IdentityFile to
select the single-use ssh key.
This works on my Debian sid machine:
rsync --rsh="ssh remove_host" ::
But on another machine that command (and others tried below) do not
access .ssh/config. The machine is running these:
$ ssh -v
OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
$ rsync --version
rsync version 2.4.6 protocol version 24
Again, the problem seems that on this machine .ssh/config is not being
read, but only when ssh is run via rsync. My guess is this is just a
problem with running the older rsync.
Is that the case, and is there a workaround other than upgrading
rsync?
Here's some examples of how it's not reading my .ssh/config:
"mysqldump" is the single-use key. You can see that rsync --rsh=ssh
isn't reading .ssh/config:
$ ls -ltu $HOME/.ssh/config /home/moseley/.ssh/mysqldump
-rw------- 1 moseley users 668 Nov 11 06:45 /home/moseley/.ssh/mysqldump
-rw-r--r-- 1 moseley users 268 Nov 11 06:45 /home/moseley/.ssh/config
$ rsync -a --rsh="ssh -F $HOME/.ssh/config -i $HOME/.ssh/mysqldump" remotehost::
unknown host: remotehost
$ ls -ltu $HOME/.ssh/config /home/moseley/.ssh/mysqldump
-rw------- 1 moseley users 668 Nov 11 06:45 /home/moseley/.ssh/mysqldump
-rw-r--r-- 1 moseley users 268 Nov 11 06:45 /home/moseley/.ssh/config
But if I use ssh directly, you can see .ssh/config is used:
$ ssh remotehost
@RSYNCD: 28
^C
$ ls -ltu $HOME/.ssh/config /home/moseley/.ssh/mysqldump
-rw------- 1 moseley users 668 Nov 11 09:36 /home/moseley/.ssh/mysqldump
-rw-r--r-- 1 moseley users 268 Nov 11 09:36 /home/moseley/.ssh/config
Other things I've tried:
$ rsync -e ssh remotehost::
$ rsync --rsh="ssh -i ~/.ssh/mysqldump" moseley at full_host_name.com::
$ RSYNC_RSH="ssh -i ~/.ssh/mysqldump" rsync moseley at full_host_name.com::
--
Bill Moseley
moseley at hank.org
--
Bill Moseley
moseley at hank.org
More information about the rsync
mailing list