PHLAK / docker-ssh-tunnel

Docker image for SSH tunnel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-ssh-tunnel

Join the Community Become a Sponsor One-time Donation
Docker Image Version Docker Pulls License Docker Cloud Build Status

Docker image for SSH tunnels.


Running the Container

In order to persist configuration data when upgrading your container you should create some named data volumes. This is not required but is highly recommended.

docker volume create --name ssh-tunnel-config
docker volume create --name ssh-tunnel-data

Next, before running the container, we must generate the server's host key files.

docker run --rm -v ssh-tunnel-config:/etc/ssh phlak/ssh-tunnel ssh-keygen -A

After the data volume has been created run the daemon container with the named data volume:

docker run -d -v ssh-tunnel-config:/etc/ssh -v ssh-tunnel-data:/.ssh -p 22:22 --name ssh-tunnel phlak/ssh-tunnel

Lastly, in order to authenticate to the SSH server your SSH public key must be added to the server's authorized_keys file.

docker exec -it ssh-tunnel authorize-key

Optional run arguments

-e TZ=America/Phoenix - Set the timezone for your server. You can find your timezone in this list of timezones. Use the (case sensitive) value from the TZ column. If left unset, timezone will be UTC.

--restart unless-stopped - Always restart the container regardless of the exit status, but do not start it on daemon startup if the container has been put to a stopped state before. See the Docker restart policies for additional details.

Troubleshooting

For general help and support join our GitHub Discussions or reach out on Twitter.

Please report bugs to the GitHub Issue Tracker.

Copyright

This project is licensed under the MIT License.

About

Docker image for SSH tunnel.

License:MIT License


Languages

Language:Dockerfile 55.4%Language:Makefile 25.8%Language:Shell 18.8%