This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fw: How to change the default outgoing port from 22 in cygwin/ssh

On Mon, Mar 30, 2009 at 1:40 PM, John MacKenzie  wrote:
> use CYGwin as an rsync emulator from my Local Windows computer to connect
> via SSH to a remote Unix based server for the purposes of backing up files.

You're not emulating anything.  You're using the Cygwin port of rsync.

> My PROBLEM: my server blocks port 22 for a small measure of security and
> uses a different port for ssh traffic.

This is not a Cygwin question.  If you read the man page for rsync:

-e, --rsh=COMMAND
              This option allows you to choose an alternative remote
shell program to use for
              communication  between  the local and remote copies of rsync.
              Command-line arguments are permitted in COMMAND provided
 that  COMMAND
              is  presented  to rsync  as  a single argument.
              Some examples:

              -e 'ssh -p 2234'

              (Note that ssh users can alternately customize
site-specific  connect  options  in
               their .ssh/config file.)

So, you can either add  "-e 'ssh -p blah' " to your rsync command
line, or add a section to your ~/.ssh/config file specifying a
different port number for all outbound ssh connections to that server
(see "man ssh_config" for how to do that).  The latter would be the
preferred option if you ever do anything besides rsync that involves
ssh to that server.

Mark J. Reed <>

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]