Docker image for SSH tunnels.
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
-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.
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.