SSH Proxy is a ssh daemon you can start on your localhost. The daemon allows tcp forwarding what makes it to a SSH Proxy.
Generate a private / public key pair using ssh-keygen:
cd ~/.ssh
ssh-keygen -t ed25519 -b 4096 -C tunnel -f ~/.ssh/tunnel -N ''
The contents of tunnel.pub will be used as PUBLIC_KEY. To get the content you can run:
cat ~/.ssh/tunnel.pub
docker runTo run the image you can execute the following command:
docker run \
--name=ssh-proxy \
--hostname=ssh-proxy \
-d \
-e PUBLIC_KEY="$(cat ~/.ssh/tunnel.pub)" \
-p 2222:2222 \
--restart unless-stopped \
ethnexus/ssh-proxy
docker-composePut the following service into you docker-compose.yml:
version: "3"
services:
sshd:
image: ethnexus/ssh-proxy
restart: unless-stopped
ports:
- 2222:2222
environment:
- PUBLIC_KEY=<your public key goes here>
Now you can compose your sshd:
docker-compose up -d
Content type
Image
Digest
sha256:1969cd9f9…
Size
12.4 MB
Last updated
almost 4 years ago
docker pull ethnexus/ssh-proxy