Pure SSH tunnel to expose a local service using a gateway
780
Create a lightweight Alpine Linux based SSH tunnel to a host. Uses pure SSH, no fluff.
Image source & learn more about ssh tunneling here
FORKED FROM jujhars13/docker-ssh-tunnel but reversed the tunnel direction.
Stay up to date (with weekly builds that ensure that OpenSSH is up to date)
Lightweight
Easy to use
No need to install anything on the host or the client
| Variable | Description | default |
|---|---|---|
SSH_PORT | Port number for SSH | 22 |
SSH_USER | Username for the SSH connection | root |
CONTAINER_IP | IP address of the container | 127.0.0.1 |
CONTAINER_PORT | The port you want to expose on the container | 80 |
GATEWAY_IP | IP/Domain of the machine that will expose your app (the host) | (required) |
REMOTE_PORT | Which port should sshd listen from on the gateway | 80 |
REMOTE_IP | Which IP should sshd listen from on the gateway (* for all) | * |
Note: Remember to inject/mount your private SSH key into the container to /ssh_key/id_rsa.
docker pull gcr.io/kalitsune/docker-reversed-ssh-tunneldocker pull kalithekitsune/docker-reversed-ssh-tunnelplease refer to the examples/docker-compose.yml file for an example.
if you want to use an open-ssh docker container as the gatewway, you can use this linux-server.io image mod
Content type
Image
Digest
sha256:37961d2a0…
Size
4.9 MB
Last updated
over 2 years ago
docker pull kalithekitsune/reversed-ssh-tunnel