Created
August 9, 2022 02:46
-
-
Save hrlai/6e1f051611197cc6d712107ab69536cf to your computer and use it in GitHub Desktop.
Using rsync with ssh tunnelling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Suppose we want to sync files through host A -> host B -> local C | |
# replace <port number>, <username>, <hostnameB>, <hostnameA> | |
rsync -av -e 'ssh -o "ProxyCommand ssh -p <port number> -A <username>@<hostnameB> -W %h:%p"' <username>@<hostnameA>:path/to/folder local/path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment