Create SSH tunnel between two docker hosts for connecting two containers.
1.1K
SSH server side of a tunnel. Companion for zokradonh/ssh-tunnel-client. Perfect for use between two docker hosts that are not in swarm environment but need encrypted container to container connection.
version: '2'
services:
tunnel:
image: zokradonh/ssh-tunnel-server
restart: always
networks:
- othercontainernet
volumes:
- ./id_ed25519.pub:/home/tunneluser/.ssh/authorized_keys
ports:
- "222:22"
networks:
othercontainernet:
external:
name: othercontainer_default
Replace id_ed25519.pub with filename of your public key.
Replace othercontainer_default with the name of the network that your target container is connected to.
Do not change othercontainernet or change both occurences.
Content type
Image
Digest
Size
4.8 MB
Last updated
over 7 years ago
docker pull zokradonh/ssh-tunnel-server