Reverse SSH: Use SSH for Reverse Shells, Because Why Reinvent the Wheel
You've probably used SSH a thousand times. You've also probably wrestled with the awkwardness of managing reverse shells—netcat listeners, custom protocols, hand-rolled connection handling. What if you could just use SSH for all of it? That's the premise behind Reverse SSH (RSSH), a tool that lets you manage and connect to reverse shells using native SSH syntax.
What It Does
Reverse SSH is a server that sits between you and a fleet of clients running on remote machines. You connect to the RSSH server with a standard SSH client, and from there you can interact with any connected client as if you were SSHing directly into it. The clients connect back to the server, which means they work from behind NATs, firewalls, or anywhere outbound connections are possible.
The architecture is straightforward: a human operator SSHes into the RSSH server, and RSSH clients on target machines maintain their own SSH connections back to that same server. The server brokers the whole thing. You get dynamic, local, and remote forwarding, plus native SCP and SFTP implementations for pulling files off targets. It supports multiple network transports—HTTP, WebSockets, TLS, and more—and offers mutual client and server authentication for high-trust control channels. There's full Windows shell support too, which is often an afterthought in tools like this.
Why It's Cool
-
SSH syntax means zero learning curve. You already know how to use SSH. You already know how to use SCP and SFTP. RSSH doesn't ask you to learn a new protocol or memorize a new CLI. That's a meaningful design decision—it respects your existing knowledge.
-
Multiple transports matter more than you'd think. Being able to tunnel over HTTP, WebSockets, or TLS means RSSH can operate in environments where raw SSH traffic might be blocked or flagged. That flexibility is practical, not just theoretical.
-
Mutual authentication is baked in. Both the client and server authenticate each other, which creates a higher-trust channel than the typical "client connects to server and hopes for the best" model. For anyone managing a fleet of remote machines, that's a real benefit.
-
The extra features are genuinely useful. Automatic connect-back, reverse shell download with client generation and a built-in HTTP server, Windows DLL generation, Windows service integration, webhooks, and even a TUN-based VPN mode. There's also fileless execution, where clients can dynamically download executables to run as the shell. Supported URI schemes make this flexible.
-
Bash autocomplete and SSH subsystems. Small quality-of-life things that add up. Whether you're on Linux or Windows, the tooling feels considered.
-
It handles Windows properly. Full Windows shell support, DLL generation, service integration—this isn't a Unix-only tool with Windows as an afterthought. If you manage mixed environments, that matters.
How to Try It
The README recommends the Docker release because it bundles the right Go version and a Windows cross-compiler. Here's the quick start:
- Pull and run the server:
docker run -p3232:2222 \
-e EXTERNAL_ADDRESS=<your.rssh.server.internal>:3232 \
-e SEED_AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" \
-v ./data:/data \
reversessh/reverse_ssh
-
There's also a Docker Compose option if you prefer that workflow.
-
Once the server is running, you connect to it with a normal SSH client on port 3232 (mapped from 2222 inside the container). From there, you can see connected clients and interact with them.
-
If you hit issues—especially on Windows—the README has a Help section covering SFTP quirks, session spawn errors (0xc0000142), and the difference between running the server in the foreground versus background. There's also a note about
--insecuremode and handshake failures, which is worth reading before you file a bug.
The full source and documentation are at github.com/nhas/reverse_ssh.
Final Thoughts
Reverse SSH is one of those tools that makes you wonder why you didn't have it sooner. It's not trying to be flashy—it's taking a protocol you already know and applying it to a problem space (reverse shells, remote fleet management) that's traditionally been served by ad-hoc scripts and custom tooling. If you're managing remote machines, doing security work, or just tired of juggling netcat listeners, this is worth a look. The Docker-first setup lowers the barrier to entry, and the breadth of features means you probably won't outgrow it quickly. It's a solid, practical tool that does one thing well and gives you room to grow into the rest.
Follow @githubprojects for more developer tools and open source projects.