1

I'm trying to rsync between two hosts. The source host has SSH keys in the destination server and I verified it can ssh without a password. The destination server is allowing ssh over port 2209.

When performing the below command in the source host I'm just prompt with a > by bash and nothing happens:

rsync -avz -e "ssh -p 2209” /var/www/ root@DESTINATION_IP:/srv/OLD_backup

Also tried other variations:

rsync -avz -e "ssh -p 2209” root@DESTINATION_IP:/srv/OLD_backup /var/www/

rsync -avz /var/www/ -e "ssh -p 2209” root@DESTINATION_IP:/srv/OLD_backup

2 Answers 2

2

I figured it out. I needed to use single quotes when specifying the ssh:

rsync -avz -e 'ssh -p 2209' /var/www/ root@DESTINATION_IP:/srv/OLD_backup
1

Your command has a mix of plain ASCII quotes (the kind you want at the command line) and fancy Unicode quotes (which the shell doesn't recognize). Specifically, the "ssh -p 2209” part starts with a plain quote and ends with a fancy quote.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .