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@full_host_name.com:: $ RSYNC_RSH="ssh -i ~/.ssh/mysqldump" rsync moseley@full_host_name.com:: -- Bill Moseley moseley@hank.org -- Bill Moseley moseley@hank.org
On Thu 11 Nov 2004, Bill Moseley wrote:> > 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.Ah, you mean ".ssh/config is being read, but not when ssh is run via rsync.". Your sentence is a bit confusing :-)> Is that the case, and is there a workaround other than upgrading > rsync?What works a lot better is understanding the rsync syntax.> Here's some examples of how it's not reading my .ssh/config:...> $ rsync -a --rsh="ssh -F $HOME/.ssh/config -i $HOME/.ssh/mysqldump" remotehost:: > unknown host: remotehostWhen you use a double colon "host::", then you're telling ssh to connect directly to the rsync daemon running on that host using port 873. In other words, ssh does not come into the equation, so it's pretty logical that the .ssh config isn't being read... Use a single colon, and it should be as you expect. This is covered in basically the first page of the manual. Paul Slootman