-
-
Save mjs/b2decf74dde518ce709b9140ecbc4ecb to your computer and use it in GitHub Desktop.
Helper for using scp through a 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
#!/bin/sh | |
if [ $# -lt 3 ]; then | |
echo "usage: sshj <jump_host> <source> <target>" | |
exit 1 | |
fi | |
jump=$1 | |
shift | |
exec scp -o ProxyCommand="ssh -W %h:%p $jump" $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment