{"id":17838257,"url":"https://github.com/marcelcoding/docker-ssh-tunnel","last_synced_at":"2025-04-02T13:47:49.977Z","repository":{"id":39863028,"uuid":"398091987","full_name":"MarcelCoding/docker-ssh-tunnel","owner":"MarcelCoding","description":"Docker SSH Tunnel is a pre configured SSH Daemon to tunnel a local port.","archived":false,"fork":false,"pushed_at":"2023-08-08T08:13:49.000Z","size":38,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T04:46:48.748Z","etag":null,"topics":["docker","ssh","tunnel"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcelCoding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-19T22:41:36.000Z","updated_at":"2022-02-05T11:54:40.000Z","dependencies_parsed_at":"2024-12-15T06:23:59.987Z","dependency_job_id":"7c7e3bc0-c7ba-4148-90bb-fb01f1b401c6","html_url":"https://github.com/MarcelCoding/docker-ssh-tunnel","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelCoding%2Fdocker-ssh-tunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelCoding%2Fdocker-ssh-tunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelCoding%2Fdocker-ssh-tunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelCoding%2Fdocker-ssh-tunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcelCoding","download_url":"https://codeload.github.com/MarcelCoding/docker-ssh-tunnel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246827758,"owners_count":20840464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","ssh","tunnel"],"created_at":"2024-10-27T20:54:55.658Z","updated_at":"2025-04-02T13:47:49.958Z","avatar_url":"https://github.com/MarcelCoding.png","language":"Dockerfile","readme":"# Docker SSH Tunnel\n\n[![Releases](https://img.shields.io/github/v/tag/MarcelCoding/docker-ssh-tunnel?label=latest%20version\u0026style=flat-square)](https://github.com/marcelcoding/docker-ssh-tunnel/releases)\n\nDocker SSH Tunnel is a pre configured SSH Daemon to tunnel a local port.\n\n## Usage\n\n1. Deploy, see deployment\n2. ```\n   ssh -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=300 -o ConnectTimeout=5 -g -R 9999:localhost:\u003clocal_port\u003e -p 9714 tunnel@\u003cssh_host\u003e\n   ```\n\nAs a scripts witch automatically reconnects you could use something like this:\n```bash\n#!/bin/sh\n\nwhile :;\ndo\n  echo \"Staring SSH tunnel...\"\n  /usr/bin/ssh -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=300 -o ConnectTimeout=5 -g -R 9999:localhost:\u003clocal_port\u003e -p 9714 tunnel@\u003cssh_host\u003e\n  echo \"SSH tunnel has exited. Retry in 10 seconds...\"\n  sleep 10\ndone\n```\n\n## Deployment\n\nThis image is available in [Docker Hub](https://hub.docker.com/r/marcelcoding/ssh-tunnel) and the\n[GitHub Container Registry](https://github.com/users/MarcelCoding/packages/container/package/ssh-tunnel):\n\n```\nmarcelcoding/ssh-tunnel:latest\nghcr.io/marcelcoding/ssh-tunnel:latest\n```\n\n### Docker \"run\" Command\n\n```bash\ndocker run \\\n  -p 9714:22 \\  \n  -p 8539:9999 \\\n  -v \"${PWD}/keys:/etc/ssh/keys/etc/ssh\" \\\n  -v \"${PWD}/authorized_keys:/home/tunnel/.ssh/authorized_keys\" \\\n  --rm \\\n  marcelcoding/ssh-tunnel:latest\n```\n\n### Docker Compose\n\n````yaml\n# docker-compose.yaml\nversion: '3.8'\n\nservices:\n\n  ssh-tunnel:\n    restart: always\n    image: marcelcoding/ssh-tunnel\n    volumes: \n      - \"./keys:/etc/ssh/keys/etc/ssh\"                        # SSH host keys\n      - \"./authorized_keys:/home/tunnel/.ssh/authorized_keys\" # authorized ssh public keys\n    ports:\n      - \"9714:22\"   # SSH\n      - \"8539:9999\" # forwarded port\n````\n\n## License\n\n[LICENSE](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelcoding%2Fdocker-ssh-tunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelcoding%2Fdocker-ssh-tunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelcoding%2Fdocker-ssh-tunnel/lists"}