Perhaps this is a lame question, but... is there a way to pass an SSH port # to rsync? At least one way I can do it is to use a small shell wrapper around ssh and pass the port # thru the environment. Just wondering if there is an easier way that I magically can't find. The reason for this is primarily because I find myself having to copy files between some local host and some remote host that is behind a firewall so I wind up using an ssh tunnel. Thanks, Keith -- SA Valaran Corp GPG: 0xEC705AE9 I put the sh in IT. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20050804/0d0b8385/attachment.bin
On Thu, Aug 04, 2005 at 02:33:28PM -0400, Keith Warno wrote:> Perhaps this is a lame question, but... > > is there a way to pass an SSH port # to rsync? > > At least one way I can do it is to use a small shell wrapper around ssh > and pass the port # thru the environment. Just wondering if there is an > easier way that I magically can't find. > > The reason for this is primarily because I find myself having to copy > files between some local host and some remote host that is behind a > firewall so I wind up using an ssh tunnel.What about sticking something like this in ~/.ssh/config (assuming Unix): Host remotehost Port 2222 ? -- Jos Backus jos at catnook.com
On Thu 04 Aug 2005, Keith Warno wrote:> Perhaps this is a lame question, but... > > is there a way to pass an SSH port # to rsync?rsync -e 'ssh -p 12345' ... I usually do this in the form 'ssh -c arcfour' as that cipher uses far less cpu power than the default. Paul Slootman
On Thu, Aug 04, 2005 at 02:33:28PM -0400, Keith Warno wrote:> is there a way to pass an SSH port # to rsync?I agree with Jos that the best way is to use your .ssh/config file (assuming you don't need multiple ports per hostname). Otherwise, use the -rsh (-e) option to rsync: -e 'ssh -p PORT' ..wayne..
Thanks for the replies. All the proposed solutions should've been obvious to me. :/ Is it Friday yet...? nope... dang... Yes I like the config file method as well, so long as I remember to use the same local port # when establishing the tunnel. keith -- SA Valaran Corp GPG: 0xEC705AE9 I put the sh in IT. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20050804/22e1641a/attachment.bin