Last active
June 19, 2024 04:59
-
-
Save garethrees/53239b2295e988ff7fd42310332abf15 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/ |
This worked for me:
# Download
rsync -av -e "ssh -J JUMP_HOST" DEST_HOST:FILE_TO_DOWNLOAD ~/Downloads/
This worked for me:
# Download rsync -av -e "ssh -J JUMP_HOST" DEST_HOST:FILE_TO_DOWNLOAD ~/Downloads/
Yeah this worked for me as well in Ubuntu 22.04
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you sir