LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync question (https://www.linuxquestions.org/questions/linux-software-2/rsync-question-494972/)

nazs 10-23-2006 07:22 PM

rsync question
 
Hi All,
I need to use rysnc to transfer files. But I need to use port 2222 instead of port 22. In the following line, how and where would I put the port number?

rsync -az -e "/usr/bin/ssh" /usr/pa/inv/ username@xx.xxx.xx.xxx:/usr/pa/inv/

Thanks,
Nazs

gilead 10-23-2006 07:31 PM

Please have a look at man rsync. You can specify the port on the source or the destination in the URL:
Code:

rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST
rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]

You can also specify the port separately:
Code:

      --port=PORT
              This  specifies  an  alternate TCP port number to use rather than the default of 873.
              This is only needed if you are using the double-colon (::) syntax to connect with  an
              rsync  daemon  (since  the  URL syntax has a way to specify the port as a part of the
              URL).  See also this option in the --daemon mode section.



All times are GMT -5. The time now is 10:39 PM.