rsync error + comando não encontrado

0

Estou tentando extrair um projeto de um servidor da AWS, mas, por algum motivo, não entendo, o rsync não está funcionando. Quando tento executar este comando:

vinicius@Inspiron-5537:~/Desktop/PHP$ rsync --protect-args -aP -e "ssh [email protected] -i ~/Desktop/Projeto.pem" "[email protected]:/var/www/projeto/" .

Eu recebo os seguintes erros:

bash: 84.26.56.23: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: remote command not found (code 127) at io.c(226) [Receiver=3.1.1]

mas a parte estranha é que se eu ssh o servidor com

ssh [email protected] -i ~/Desktop/Projeto.pem

registra bem! Alguém pode me dizer o que está acontecendo? Como devo proceder para puxar meus arquivos do servidor. Eu não sei se tem algo a ver com, mas o /var/www/projeto/ sendo de propriedade do usuário root, mas todos os usuários têm pelo menos permissão de leitura. Meu cliente é o Ubuntu 16.04 e meu servidor é o Ubuntu 14.04.

    
por Vini.g.fer 17.10.2017 / 02:34

1 resposta

1

Use

rsync --protect-args -aP -e "ssh -i ~/Desktop/Projeto.pem" "[email protected]:/var/www/projeto/" .

man rsync estados

-e, --rsh=COMMAND specify the remote shell to use

e

-e, --rsh=COMMAND This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network.

If this option is used with [user@]host::module/path, then the remote shell COMMAND will be used to run an rsync daemon on the remote host, and all data will be transmitted through that remote shell connection, rather than through a direct socket connection to a running rsync daemon on the remote host. See the section lqUSING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTIONrq above.

Command-line arguments are permitted in COMMAND provided that COMMAND is presented to rsync as a single argument. You must use spaces (not tabs or other whitespace) to separate the command and args from each other, and you can use single- and/or double-quotes to preserve spaces in an argument (but not backslashes). Note that doubling a single-quote inside a single-quoted string gives you a single-quote; likewise for double-quotes (though you need to pay attention to which quotes your shell is parsing and which quotes rsync is parsing). Some examples:

CW -e 'ssh -p 2234'

CW -e 'ssh -o "ProxyCommand nohup ssh firewall nc -w1 %h %p"' (Note that ssh users can alternately customize site-specific connect options in their .ssh/config file.)

You can also choose the remote shell program using the RSYNC_RSH environment variable, which accepts the same range of values as -e.

See also the --blocking-io option which is affected by this option.

então o extra [email protected] é o que o quebrou.

    
por 17.10.2017 / 03:16