Skip to content
Nat Lee

Keyboard shortcuts

Turn these off if they get in the way of a screen reader or voice control. The setting is saved in this browser.

1
Home
2
Work
3
Projects
4
About
5
Experience
/
Search projects
?
Show this panel

DevOps

SSH Reverse Tunnel with Docker

Telepy's rough first draft

Digs a hole out of an internal network with a container and a reverse SSH tunnel. Telepy's rough first draft, before it had a dashboard or manners.

Role
Creator & Maintainer
Period
2020 – 2021
Status
Completed
Categories
Infrastructure & backend
Stack
  • Docker
  • SSH
  • Shell Scripting
  • Network Security
SSH Reverse Tunnel with Docker, screenshot 1

Overview

A containerized solution for creating reverse SSH tunnels using Docker. This tool helps establish secure connections through network barriers by creating tunneling servers in isolated environments.

What it's good for

Reaches a machine behind NAT over plain SSH, set up with one command per end. If the inside machine and its key get stolen, the thief gets no shell, no sudo and no other port on your server, and uninstall --all leaves the folder exactly as you cloned it.

Diagrams

Main paths only. The edge cases stayed in the code.

The old version accepted any host key. Now it remembers faces.

Point at a box to see what it connects to.

  1. Install the outside server(asks ports, makes host keys) → Install the inside machine
  2. Install the inside machine(makes tunnel and login keys) → Authorize its key on the server
  3. Authorize its key on the server(tunnel port only, no shell) → Server accepts the tunnel key?
  4. Server accepts the tunnel key?(you confirm its host key once) → no: Authorize its key on the server → yes: autossh dials out, holds on
  5. autossh dials out, holds on(redials whenever it drops) → Log in through the tunnel
  6. Log in through the tunnel(install proves it works) → Tunnel check passed?
  7. Tunnel check passed? → yes: You ssh -p 22224 in → no: Check firewall, key and logs
  8. Check firewall, key and logs(autossh keeps trying meanwhile) → fixed: autossh dials out, holds on
  9. You ssh -p 22224 in(anyone can knock; only keys enter) → Need another inside machine?
  10. Need another inside machine? → yes: Forward a port with ssh -L → no: Finished? tunnel.sh uninstall
  11. Forward a port with ssh -L(e.g. its web page) → Finished? tunnel.sh uninstall
  12. Finished? tunnel.sh uninstall(--all: folder as cloned)

Features

  • Containerized tunnel creation
  • Network penetration capabilities
  • Automated setup scripts
  • Security isolation

What I learned

  • The old setup accepted any host key; now autossh remembers the server's key after you confirm it once and refuses a different one.
  • Tunnel keys used to sit on the outside server with no limits, shell included. Since November 2026 each one opens only its own tunnel port.
  • No curl | bash installer on purpose: piping a download into bash runs code you haven't seen, or half of it if the download breaks.
  • Infrastructure & backend1313 stars on GitHub

    Telepy

    One outbound reverse SSH tunnel per device gives you a browser terminal, files, remote desktop, a remote browser and the LAN behind it. No port forwarding, no VPN, no public IP.

    2024Active
  • Infrastructure & backend66 stars on GitHub

    Dev Dock Manager (Rust)

    One Docker dev box per user, with a web terminal, a noVNC desktop and optional GPU. The Django version, rewritten in Rust, partly to find out whether I could.

    2023Active
  • Spin-off · Contract work
    Infrastructure & backend11 stars on GitHub

    Blockchain from Scratch

    Nine hands-on chapters, from hashing to a peer-to-peer network. The same Rust code powers interactive WebAssembly demonstrations in your browser.

    2018Completed