sshbox
A very simple SSH server that "boxes" you into a sandbox environment using
uLinux box
utility for creating
lightweight sandboxes -- or any process you want to use as a "sandbox".
Can also be used as a regualr SSH server 😉
Based on this example
Features
sshbox
supports:
- Authorized Key for authenticating sessions
- Github for authenticating sessions
- Sandboxing by running
box
or docker
to sandbox sessions
Install
If you have a Go development environment setup with $GOPATH/bin/
in your $PATH
the following will just work™ 😀
go get -u git.mills.io/prologic/sshbox
Otherwise you can build from source using git
(You still need the Go compiler):
git clone https://git.mills.io/prologic/sshbox.git
cd sshbox
make
Prebuilt Binaries
There are prebuilt binaries I publish regularly to the
Releases page you can download
and install. Example:
wget https://git.mills.io/prologic/sshbox/releases/download/0.0.2/sshbox_0.0.2_linux_amd64.tar.gz
tar xvf sshbox_0.0.2_linux_amd64.tar.gz
Usage
Run an SSH server on the default port listening port ;2222
, authorising
users with an authorized_keys
file and sandbox user sessions using box
with an Alpine Linux container:
sshbox ~/.ssh/authorized_keys 'box run alpine /bin/sh'
Same thing but authorize users via their Github SSH Keys:
sshbox -g /dev/null 'box run alpine /bin/sh'
NOTE: Only tested on uLinux.
This may work on your system, your milage may vary. File an issue or pull
request if you have any questions, issues or improvements.
License
sshbox
is licensed under the terms of the MIT License