Rsync with a custom port

You can rsync with a different port by adding
`-e “ssh –port”` into the
`rsync` command.


This content originally appeared on Zell Liew and was authored by Zell Liew

(Hey, we're having problems showing images in RSS right now, so if you want a better reading experience, consider viewing this article online [here](https://zellwk.com//blog/rsync-with-custom-port. We hope to fix this soon!).

You can rsync with a different port by adding -e "ssh --port" into the rsync command.

Here's what it looks like:

rsync -avz -e "ssh --port" source username@host.com:/destination

-e specifies a remote shell to use. In this case, we set it to ssh. Once we set it to ssh, we can use other flags that come with ssh.

-avz are other flags I commonly use for rsync. They stand for archive, verbose, and compress.

  • -a — archive mode. This is complex since it equals to -rlptgoD. Basically this does lots of improvements to make it easier to copy folders recursively.
  • -v — verbose. It lets me see which files are transferred.
  • -z — compress. This makes the transfer faster by compressing data.

That’s it!


This content originally appeared on Zell Liew and was authored by Zell Liew


Print Share Comment Cite Upload Translate Updates
APA

Zell Liew | Sciencx (2022-03-17T16:00:00+00:00) Rsync with a custom port. Retrieved from https://www.scien.cx/2022/03/17/rsync-with-a-custom-port/

MLA
" » Rsync with a custom port." Zell Liew | Sciencx - Thursday March 17, 2022, https://www.scien.cx/2022/03/17/rsync-with-a-custom-port/
HARVARD
Zell Liew | Sciencx Thursday March 17, 2022 » Rsync with a custom port., viewed ,<https://www.scien.cx/2022/03/17/rsync-with-a-custom-port/>
VANCOUVER
Zell Liew | Sciencx - » Rsync with a custom port. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/17/rsync-with-a-custom-port/
CHICAGO
" » Rsync with a custom port." Zell Liew | Sciencx - Accessed . https://www.scien.cx/2022/03/17/rsync-with-a-custom-port/
IEEE
" » Rsync with a custom port." Zell Liew | Sciencx [Online]. Available: https://www.scien.cx/2022/03/17/rsync-with-a-custom-port/. [Accessed: ]
rf:citation
» Rsync with a custom port | Zell Liew | Sciencx | https://www.scien.cx/2022/03/17/rsync-with-a-custom-port/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.