Sign inSign up

phlak/ssh-tunnel

By phlak

Updated over 4 years ago

Docker image for SSH tunnels.

Image
0

1.4K

phlak/ssh-tunnel repository overview

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.

This project is licensed under the MIT License.

Tag summary

Content type

Image

Digest

Size

3.6 MB

Last updated

over 4 years ago

docker pull phlak/ssh-tunnel