Project to build secured and hardened Bastion Docker image
Google Authenticator is a free & open source MFA solution - to enable it as MFA provider:
export MFA_PROVIDER=google-authenticator
Here's how you can quickly run the bastion. Assuming you have ~/.ssh/authorized_keys
properly configured and your SSH key (e.g. ~/.ssh/id_rsa
) added to your SSH agent.
$ docker run -it -p 1234:22 \
-e MFA_PROVIDER=google-authenticator \
-v ~/.ssh/authorized_keys:/root/.ssh/authorized_keys
OlegGorJ/bastion-image:latest
In another terminal you should be able to run:
$ ssh root@localhost -p 1234
The first time you connect, you'll be asked to setup your MFA device, then, each next time you connect, you'll be prompted to enter your MFA token.