rsync with forced-command ssh and variable files

Alex mysqlstudent at gmail.com
Mon Apr 26 15:36:11 MDT 2010


Hi,

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?

Maybe spawn a shell script that picks up on the rsync command and
operates on it, such as just renaming the file once it's transfered?

If this isn't possible, how can I restrict it to be as secure as possible?

What is the meaning of the 'e.is' arguments on the command line?

Thanks,
Alex


More information about the rsync mailing list