https://github.com/jeroenj/docker-ssh-tunnel
This Docker image provides a simple way to establish (and maintain) ssh tunnels.
https://github.com/jeroenj/docker-ssh-tunnel
autossh autossh-tunnel-server docker ssh
Last synced: 2 months ago
JSON representation
This Docker image provides a simple way to establish (and maintain) ssh tunnels.
- Host: GitHub
- URL: https://github.com/jeroenj/docker-ssh-tunnel
- Owner: jeroenj
- License: mit
- Created: 2017-12-19T13:53:07.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2025-01-10T21:41:58.000Z (9 months ago)
- Last Synced: 2025-06-10T04:06:33.809Z (4 months ago)
- Topics: autossh, autossh-tunnel-server, docker, ssh
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/jeroenj/ssh-tunnel
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-ssh-tunnel
This Docker image provides a simple way to establish (and maintain) ssh tunnels. It uses [autossh](http://www.harding.motd.ca/autossh/) to manage the SSH connection.
## Usage
```sh
docker run --rm -it -p 3000:3000 -v /path/to/id_rsa:/ssh_identity jeroenj/ssh-tunnel 0.0.0.0:3000:localhost:3000 user@example.com
```This will establish an SSH connection to `example.com` as the `user` user. The port `3000` on `localhost` (on `example.com`) will be tunneled to port `3000`. Port `3000` is then mapped to port `3000` on the Docker host.
An SSH key can be used in order for authentication which can be mounted as a volume at `/ssh_identity`. Make sure it's mode is set to `0600`.