Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silaskalmbach/docker_autossh_tunnel
Minimal Dockerfile to pass any number of ports with autossh through an ssh tunnel
https://github.com/silaskalmbach/docker_autossh_tunnel
autossh autossh-tunnel-server balena docker docker-compose homelab raspberry-pi
Last synced: 22 days ago
JSON representation
Minimal Dockerfile to pass any number of ports with autossh through an ssh tunnel
- Host: GitHub
- URL: https://github.com/silaskalmbach/docker_autossh_tunnel
- Owner: silaskalmbach
- License: mit
- Created: 2022-02-14T14:12:23.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-14T17:05:04.000Z (almost 3 years ago)
- Last Synced: 2024-01-27T02:43:21.300Z (11 months ago)
- Topics: autossh, autossh-tunnel-server, balena, docker, docker-compose, homelab, raspberry-pi
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flexible Autossh Tunnel (Docker)
Minimal Dockerfile to pass any number of ports with autossh through an ssh tunnel. The Dockerfile is designed to allow ssh-keygen to be included without linking them in a separate volume. Well suited to include them in IoT services like Balena.
To do this, add your ssh key to the folder "ssh_key" and specify it's name in docker-compose.
If you don't want to use an ssh key, just remove the part"-i /ssh_key/${KEYNAME}"\
from the tunnel.sh file.### Docker-Compose example, as it can also be found in the repository:
```yaml
version: '2.1'services:
tunnel:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- 3001:3001 #Ports not necessary for an reverse ssh tunnel
environment:
- TUNNEL=-R 0.0.0.0:3000:localhost:80 -L 3001:localhost:1880 #as many tunnels as you like
- SSH_USER=ubuntu
- KEYNAME=example.key
- SSH_PORT=22 #22 [Default]
```---
© Silas Kalmbach