Skip to content

Instantly share code, notes, and snippets.

@CL-Jeremy
Created January 20, 2021 19:04
Show Gist options
  • Save CL-Jeremy/f0d7d18260df367fcc3727b154780d04 to your computer and use it in GitHub Desktop.
Save CL-Jeremy/f0d7d18260df367fcc3727b154780d04 to your computer and use it in GitHub Desktop.
Shim for chainloading external SSH server (at port 2222) from genie bottle; add to /etc/shells for this to be accepted by sshd
#!/bin/sh
if [ $# -eq 0 ]; then
CMD="-t bash"
else
[ "$1" = "-c" ] && shift && CMD="bash -c $(printf %q "$@")"
fi
ssh -q -p 2222 windows.local $CMD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment