markcliff@gmail.com
2008-May-05 16:26 UTC
Rsync with daemon over SSH on port 22 not daemon port
Hi gurus! First time post: Scenario want to talk to daemon locked behind a firewall using encrypted transfer of files. Have daemon setup on port 10001. Do not have NC, do not have root access. Client command : rsync -avzul -e "ssh -vvv -l username" /home/users/blah/ rsync://lrem02:10001::/live As you can see the connection is set to talk to lrem02 on port 10001 however i want to encrypt transfer so i assumed i could do the following: rsync -avzul -e "ssh -vvv -l username -L 10001:lrem01:22" /home/users/blah/ rsync://lrem02:10001::/live However this doesnt work as i perhaps need to config server side :( How can i transfer to a non standard SSH daemon port (10001) with non-root and non access to alter the init default files (873). All help appreciated im assuming my connection is been ignored -e as doesnt make sense i have tried 60 ways id say --rsh=ssh etc but need to turn too the experts! Many thanks info appreciated... -- This message was sent on behalf of markcliff@gmail.com at openSubscriber.com http://www.opensubscriber.com/messages/rsync@lists.samba.org/topic.html
On Mon 05 May 2008, markcliff@gmail.com wrote:> Have daemon setup on port 10001. > > Do not have NC, do not have root access. > > Client command : > > rsync -avzul -e "ssh -vvv -l username" /home/users/blah/ rsync://lrem02:10001::/liveFirstly, this syntax is not quite correct, the manpage says: rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST That would translate to: rsync://lrem02:10001/live i.e. don't confuse the two ways of specifying a daemon transfer (rsync://host/module and host::module) Secondly, if you have a daemon on 10001, why are you using ssh? Alternatively, if you have ssh access, why use a daemon?> How can i transfer to a non standard SSH daemon port (10001) with non-root and non access to alter the init default files (873).If you have an _ssh_ daemon on 10001, then use: rsync -e 'ssh -p 10001' ... You could also make an entry for the remote host in ~/.ssh/config , like so: Host remotehost Port 10001 That will then be used as the default ssh port for that remotehost. Paul Slootman
On Mon, May 05, 2008 at 11:24:04AM -0400, markcliff@gmail.com wrote:> rsync -avzul -e "ssh -vvv -l username" /home/users/blah/ rsync://lrem02:10001::/liveThat tells rsync to start up a single-use rsync daemon on the remote system after logging in via ssh. Daemon port numbers are completely ignored when you request a single-use rsync daemon. See the firewall section of the FAQ, which links to the firewall page: http://rsync.samba.org/FAQ.html#6 http://rsync.samba.org/firewall.html Method 5 on the firewall page covers using ssh to open a tunnel to the remote port. And no, you can't have rsync run that ssh command, since the -e option is only for specifying how rsync should run the rsync command on the remote system, not for running a auxiliary command to start a forwarded port (and rsync needs to open a socket connection without using a remote shell in a port-forwarding scenario). ..wayne..