Create SSH tunnel between two docker hosts for connecting two containers.
1.1K
Creates an SSH tunnel to another SSH server. Companion for zokradonh/ssh-tunnel-server.
Before creating the container create your private key with openssl without passphrase.
Also get the fingerprint of the SSH server via retrieve-host-fingerprint.sh.
version: '2'
services:
tunnel:
image: zokradonh/ssh-tunnel-client
restart: always
environment:
- "TUNNELHOST=someserver.tld"
- "TUNNELHOSTPORT=22"
- "TARGETHOST=${TARGETHOST}"
- "TARGETPORT=389"
- "LISTENPORT=389"
- "TUNNELUSER=userOnTunnelHost"
volumes:
- ./myprivate.key:/root/private.key
- ./known_hosts:/root/.ssh/known_hosts
Replace myprivate.key with filename of your real key.
0.0.0.0Content type
Image
Digest
Size
5.6 MB
Last updated
over 7 years ago
docker pull zokradonh/ssh-tunnel-client