Skip to content

Instantly share code, notes, and snippets.

@darnould
Created July 17, 2015 22:50
Show Gist options
  • Save darnould/d0a0a4e2165ae23c8e39 to your computer and use it in GitHub Desktop.
Save darnould/d0a0a4e2165ae23c8e39 to your computer and use it in GitHub Desktop.
SSH Bastion
#!/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