Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do...

ssh -av -e deploy@domain.com:/var/www/domain.com /Users/user/workspace/domain

But it's outputting this (I presume because of the period character):

OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
Bad escape character 'deploy@domain.com:/var/www/domain.com'.

I have tried

ssh -av -e deploy@domain.com:/var/www/domain\.com /Users/user/workspace/domain

And various combinations with quotes. What is the right syntax?

share|improve this question

closed as too localized by Gilles, Mat, Renan, Stéphane Gimenez, Ulrich Dangel Aug 16 '12 at 0:30

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

What? Take a look at your command again. It says ssh ... -e. Where is the rsync? – jw013 Jul 7 '12 at 17:20
Well, that was awkward. – Duopixel Jul 7 '12 at 17:24
up vote 6 down vote accepted

You're doing this:

ssh -av -e deploy@domain.com:/var/www/domain.com /Users/user/workspace/domain

You're not executing rsync at all and ssh is telling you that deploy@domain.com:/var/www/domain.com is not a valid escape character.

Read ssh(1):

-e escape_char
Sets the escape character for sessions with a pty (default: `~'). The escape character is only recognized at the beginning of a line. The escape character followed by a dot (`.') closes the connection; followed by control-Z suspends the connection; and followed by itself sends the escape character once. Setting the character to ``none'' disables any escapes and makes the session fully transparent.

I think what you meant to run is this:

rsync -e ssh -av deploy@domain.com:/var/www/domain.com /Users/user/workspace/domain
share|improve this answer
Thanks for you help. Yes, this was the problem. – Duopixel Jul 7 '12 at 17:25
Feel free to accept this answer. – bahamat Jul 7 '12 at 17:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.