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
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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.