Public | Automated Build

Last pushed: 2 years ago
Short Description
A container that runs ssh and openconnect.
Full Description

What is this?

A container that runs ssh and openconnect.
I use it for ssh'ing to servers through the vpn from the localhost(my laptop) running the container.

NOTE: Privileged mode is needed for the TUN adapter in the container.

Environment variables needed

SSH_PUB - This is your public ssh key that will be allowed to ssh as root into the container.

PASSWORD - The password passed to openconnect.

OPTIONS - Options passed to openconnect. Example -e OPTIONS="-u awesome_admin --authgroup=ADMINS --no-cert-check"

SERVER - Server to connect to with openconnect.

Docker run options needed

You should provide a port from localhost to the container to connect to ssh with.


docker run --privileged \

-p \

-e SSH_PUB="$(cat ~/.ssh/" \

-e OPTIONS="-u awesome_admin --authgroup=ADMINS --no-cert-check" \

-e SERVER=vpnserver.local \

-e PASSWORD=9999187428 \

-t gibby/openconnect

SSH Config on localhost

Put something like below in your .ssh/config with ProxyCommand for the hosts behind the vpn

ProxyCommand ssh -p 2200 root@localhost nc %h %p


Add a socks proxy inside the container and drop using ssh.

Docker Pull Command
Source Repository