RSYNC com Senha

1. RSYNC com Senha

Willian Silvan
wsilvan

(usa Ubuntu)

Enviado em 14/06/2011 - 21:03h

Pessoal, boa noite!

Alguém sabe me dizer como faço faço para rodar o rsync já com a senha incluída no comando?

Pois do jeito abaixo, ele pede senha:

rsync -ravzup $pastaorigem $logindestino@$ftpdestino:~/$pastadestino
$logindestino@$ftpdestino's password:

Agradeço se puderem ajudar :D

Valew


  


2. Re: RSYNC com Senha

Elder Marco
eldermarco

(usa Fedora)

Enviado em 14/06/2011 - 23:41h

Veja que interessante essa explicação na man page do rsync:

----------------------------
Some modules on the remote daemon may require authentication. If so, you will receive a password prompt
when you connect. You can avoid the password prompt by setting the environment variable RSYNC_PASSWORD to
the password you want to use or using the --password-file option. This may be useful when scripting rsync.

WARNING: On some systems environment variables are visible to all users. On those systems using --password-file is recommended.

----------------------------

E sobre a opção --password-file:

-----------------------------
--password-file:
This option allows you to provide a password in a file for accessing an rsync daemon. The file must
not be world readable. It should contain just the password as the first line of the file (all other
lines are ignored).

This option does not supply a password to a remote shell transport such as ssh; to learn how to do
that, consult the remote shell’s documentation. When accessing an rsync daemon using a remote shell
as the transport, this option only comes into effect after the remote shell finishes its authentication (i.e. if you have also specified a password in the daemon’s config file).
-----------------------------

Isso deve resolver.






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts