rsync with forced-command ssh and variable files

Matt McCutchen matt at mattmccutchen.net
Mon Apr 26 17:44:17 MDT 2010


On Mon, 2010-04-26 at 17:36 -0400, Alex wrote:
> I had asked a variation on this some time ago, but am trying to do
> something a bit different this time. I'd like to sync a file with a
> remote host using ssh and a command= ssh key, like this in
> ~/.ssh/authorized_keys:
> 
> command="/usr/bin/rsync --server -logDtprze.is . /home/user/mail/"
> ssh-dss AAAAB3NzaC1...
> 
> On the sending side, the following is run:
> 
> # rsync -az --stats  -e "ssh -c blowfish -i /root/.ssh/mykey-dss"
> /home/user/myfile myhost.com:/home/user/mail/my-mbox-2010-04-26
> 
> However, it doesn't maintain the destination filename through the
> transfer, but instead just results in the remote file being named the
> same as the source. How can I wildcard this so it renames it to the
> proper filename for the transfer?

My answer is the same as last time: don't override the rsync server
command, instead use an rsync daemon.

-- 
Matt



More information about the rsync mailing list