Hi, I have searched the whole internet and mailing list and I was unable
to find a clear answer to this. The method described in the FAQ [1] are
not useful for me.

Three machines source, middle, target. ssh into middle from source
requires password pass_middle. ssh into target from middle requires
password pass_target. One cannot reach target from source. So I can do:

source $ ssh middle
middle's password: pass_middle
middle $ ssh target
target's password: pass_target
target $

Also I can do it in one step:

source $ ssh -t middle ssh target
middle's password: pass_middle
target's password: pass_target
target $

Now, I want to transfer files from source to target.

source $ rsync -e "ssh -t middle ssh target" :/path/to/remote/file .
Pseudo-terminal will not be allocated because stdin is not a terminal.
middle's password:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

This doesn't work. Neither does:

source $ rsync -e "ssh -t -t middle ssh target" :/path/to/remote/file .
middle's password:
tcgetattr: Invalid argument
protocol version mismatch - is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(60)

Finally, the simplest form also won't work.

source $ rsync -e "ssh middle ssh target" :/path/to/remote/file .
middle's password:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

Both ask the first password but they generate an error before asking for
the second one.

I know for sure that if you can ssh into target from middle without a
password (using keys or whatever), then the second rsync command works
perfectly.

I wish to know if there is a way to achieve this, that is, rsync asks
for both passwords and then transfers the files. In case it is not
currently possible, would it ever be possible, that is, should I fill a
bug report or feature request report? Otherwise, it would be interesting
to update the rsync FAQ [1] to state that this is clearly impossible and
one must use a passwordless authentication method in the second hop.

Thanks for your help,

Manuel.

(Please CC me in the reply since I am not subscribed to the list)


[1] http://samba.anu.edu.au/rsync/FAQ.html#6


______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html