The shine09/ssh-client-websocat:latest Docker image is a lightweight solution for establishing secure SSH tunnels over WebSocket connections using websocat. It is designed for scenarios requiring secure port forwarding to remote services through a WebSocket proxy, such as in restricted network environments.
services:
ssh-forward:
image: shine09/ssh-client-websocat:latest
container_name: ssh-forward
restart: always
volumes:
- /Users/shine/.ssh/config-ssh-forward:/root/.ssh/config:ro
- /Users/shine/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro
- /Users/shine/.ssh/id_ed25519.pub:/root/.ssh/id_ed25519.pub:ro
command: ["ssh", "-v", "-N", "-o", "ExitOnForwardFailure=yes", "-o", "StrictHostKeyChecking=no", "forward.service"]
ports:
- 10000:10000
- 10042:10042
Host forward.service
User root
ProxyCommand websocat --binary -k wss://my-self-server-1.example.com
PreferredAuthentications publickey
IdentitiesOnly yes
RequestTTY no
ServerAliveInterval 10
ServerAliveCountMax 3
TCPKeepAlive yes
IdentityFile ~/.ssh/id_ed25519
LocalForward 0.0.0.0:10000 172.1.1.130:3306
LocalForward 0.0.0.0:10042 172.2.2.21:3389
config-ssh-forward) with your WebSocket proxy and port forwarding details.id_ed25519, id_ed25519.pub) are available.docker-compose.yaml to run the container, mounting the configuration and key files.shine09/ssh-client-websocat:latest Docker 镜像是一个轻量级解决方案,用于通过 websocat 借助 WebSocket 连接建立安全的 SSH 隧道。它适用于需要在受限网络环境中通过 WebSocket 代理进行安全端口转发的场景。
services:
ssh-forward:
image: shine09/ssh-client-websocat:latest
container_name: ssh-forward
restart: always
volumes:
- /Users/shine/.ssh/config-ssh-forward:/root/.ssh/config:ro
- /Users/shine/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro
- /Users/shine/.ssh/id_ed25519.pub:/root/.ssh/id_ed25519.pub:ro
command: ["ssh", "-v", "-N", "-o", "ExitOnForwardFailure=yes", "-o", "StrictHostKeyChecking=no", "forward.service"]
ports:
- 10000:10000
- 10042:10042
Host forward.service
User root
ProxyCommand websocat --binary -k wss://my-self-server-1.example.com
PreferredAuthentications publickey
IdentitiesOnly yes
RequestTTY no
ServerAliveInterval 10
ServerAliveCountMax 3
TCPKeepAlive yes
IdentityFile ~/.ssh/id_ed25519
LocalForward 0.0.0.0:10000 172.1.1.130:3306
LocalForward 0.0.0.0:10042 172.2.2.21:3389
config-ssh-forward),指定 WebSocket 代理和端口转发详情。id_ed25519、id_ed25519.pub)已准备好。docker-compose.yaml 运行容器,挂载配置文件和密钥文件。docker-compose.yaml :
services:
ssh-forward:
image: shine09/ssh-client-websocat:latest
container_name: ssh-forward
restart: always
volumes:
- /Users/shine/.ssh/config-ssh-forward:/root/.ssh/config:ro
- /Users/shine/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro
- /Users/shine/.ssh/id_ed25519.pub:/root/.ssh/id_ed25519.pub:ro
command: [ "ssh", "-v", "-N", "-o", "ExitOnForwardFailure=yes", "-o", "StrictHostKeyChecking=no", "forward.service" ]
ports:
- 10000:10000
- 10042:10042
/Users/shine/.ssh/config-ssh-forward :
Host forward.service.work
User root
ProxyCommand websocat --binary -k wss://my-self-server-1.example.com
PreferredAuthentications publickey
IdentitiesOnly yes
RequestTTY no
ServerAliveInterval 10
ServerAliveCountMax 3
TCPKeepAlive yes
IdentityFile ~/.ssh/id_ed25519
LocalForward 0.0.0.0:10000 172.1.1.130:3306
LocalForward 0.0.0.0:10042 172.2.2.21:3389
Content type
Image
Digest
sha256:bc0342325…
Size
11.7 MB
Last updated
over 1 year ago
docker pull shine09/ssh-client-websocat