rsync over different ssh port

Tim Potter tpot at
Tue Nov 6 11:40:48 EST 2001

On Mon, Nov 05, 2001 at 07:23:12PM -0500, JD Paul wrote:

> Make a script; call it 'sshp' for this example:
> % cat sshp
> #!/bin/sh
> exec ssh -p 8022 "$*"
> and then run
> rsync -av -e sshp <source> <dest>
> Such a wrapper script is useful for including other options (-x, -a,
> -o 'BatchMode yes', etc.). 

If you just want to use the -p option you can always do:

rsync -av -e 'ssh -p 8022' <source> <dest>

Of course the script option is better if you don't want to type it
in all the time.


More information about the rsync mailing list