Skip to content

Instantly share code, notes, and snippets.

@tmclnk
Created August 26, 2021 15:20
Show Gist options
  • Save tmclnk/6f93729a193508f6ad48ef5861cc56e8 to your computer and use it in GitHub Desktop.
Save tmclnk/6f93729a193508f6ad48ef5861cc56e8 to your computer and use it in GitHub Desktop.
SSH
# SCP through jumpbox-1 (ssh >= 7.3)
scp -oProxyJump=jumpbox-1 LOCALFILE TARGET:
# SCP through jumpbox-1 (ssh < 7.3)
scp -oProxyCommand="ssh -W %h:%p jumpbox-1" LOCALFILE TARGET:
# Transfer via Unix Pipes
tail -50 hello.csv | ssh ip-10-150-81-90.ec2.internal "cat >/var/tmp/$(date +%s).csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment