-
-
Save zhu3pang/d7b8604708676dabbf06fa05d9eaabfb to your computer and use it in GitHub Desktop.
rsync & scp through jump host
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
# Upload | |
rsync -av -e "ssh -A JUMP_HOST ssh" FILE_TO_SEND DEST_HOST:/home/gareth/ | |
# Download | |
rsync -av -e "ssh -A JUMP_HOST ssh" DEST_HOST:~/FILE_TO_DOWNLOAD ~/Downloads/ |
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
# Upload | |
scp -oProxyCommand="ssh -W %h:%p JUMP_HOST" FILE_TO_SEND DEST_HOST:/home/gareth/ | |
# Download | |
scp -oProxyCommand="ssh -W %h:%p JUMP_HOST" DEST_HOST:FILE_TO_DOWNLOAD ~/Downloads/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment