rsync through multiple ssh hops with password authentication prompt

This is a discussion on rsync through multiple ssh hops with password authentication prompt within the Rsync forums, part of the Networking and Network Related category; Hi, I have searched the whole internet and mailing list and I was unable to find a clear answer to ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-19-2005
Manuel López-Ibáñez
 
Posts: n/a
Default rsync through multiple ssh hops with password authentication prompt

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:56 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0