Eu tentei o caminho inverso:
ssh ssh
some local directory -----> server1 -----> server2 .
ambos ssh precisam de senha para se conectar.
Eu tentei isso:
rsync local_dir -e "ssh -X user1@server1 ssh" user2@server2:/path/to/dir
Eu digitei a primeira senha (para server2). Então senha para user1. E esse erro chega:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]
Alguma ideia?
Edit : Answered myself again but using a scp instaed :
scp -rp -oProxyCommand="ssh -W %h:%p user1@server1" localDirectoryToTransfer user2@server2:/path/to/dir