Created
July 17, 2015 22:50
-
-
Save darnould/d0a0a4e2165ae23c8e39 to your computer and use it in GitHub Desktop.
SSH Bastion
This file contains hidden or 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 | |
DEST=$2 | |
if [[ -n $DEST ]]; then | |
nc -- $DEST | |
else | |
exit 1 | |
fi | |
## This script would be the default shell of the bastion user. | |
## Example SSH config | |
# Host *,bastioned | |
# User bastion # Ideally you'd be user-specific here, for revocation & non-repudiation purposes. | |
# ProxyCommand >&1; h="%h"; exec ssh -q [email protected] ${h%%,*} %p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment