ngyuki / docker-insecure-sshd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

insecure openssh server for port forwarding via stdio

ngyuki/insecure-sshd - Docker Hub

Demo

asciicast

Usage

# docker-compose.yml
version: "3.7"
services:
  fwd:
    image: ngyuki/insecure-sshd
  app:
    image: alpine
    command: [ tail, -f, /dev/null ]
# console 1
nc -lkv 5000

# console 2
docker-compose up

# console 3
ssh root@localhost -C -N -g \
  -o ProxyCommand='docker-compose exec -T fwd nc localhost 22' \
  -o ExitOnForwardFailure=yes \
  -o PermitLocalCommand=yes \
  -o LocalCommand='echo ok' \
  -o StrictHostKeyChecking=no \
  -R 5000:localhost:5000

# console 4
docker-compose exec app nc -v fwd 5000

About


Languages

Language:Dockerfile 54.2%Language:Shell 45.8%