https://github.com/solo5star/ssh-tunnel
SSH tunneling with Docker
https://github.com/solo5star/ssh-tunnel
Last synced: about 2 months ago
JSON representation
SSH tunneling with Docker
- Host: GitHub
- URL: https://github.com/solo5star/ssh-tunnel
- Owner: solo5star
- Created: 2023-08-07T12:52:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-07T12:52:51.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T13:56:22.725Z (about 1 year ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ssh-tunnel using docker
When you have something you want to connect beyond the firewall, you can use this Docker image to establish a connection. The usage is very simple.
## Simple usage for database connection
```sh
docker run \
--rm \
-p 3306:3306 \
-v $HOME/.ssh:/ssh \
-e TUNNEL_HOST=example.com \
-e LOCAL_PORT=3306 \
-e REMOTE_HOST=localhost \
-e REMOTE_PORT=3306 \
solo5star/ssh-tunnel
```Your `~/.ssh/config` file should be:
```
Host example.com
HostName example.com
User solo5star
IdentityFile ~/.ssh/example.pem
```