irohssh
SSH over Iroh.
This tool provides a way to create SSH connections using an Iroh node ID instead of an IP address, allowing you to connect to devices behind NATs without needing public IPs or complex firewall configuration.
Quick Start
Install and run irohssh
with a single command. This will download the latest binary from GitHub Releases.
coming soon Linux / macOS:
|
Windows (PowerShell):
irm https://github.com/rustonbsd/iroh-ssh/releases/latest/download/install.ps1 | iex
Usage
irohssh
operates in two modes: a server
mode for the machine you want to access, and a client mode for the machine you are connecting from.
1. On the remote machine (the one you want to connect to)
Start the server. It will listen for incoming Iroh connections and forward them to the local SSH server (sshd
).
# Start the server, forwarding to the local SSH port 22
# The server will print its Iroh nodeid. Copy this ID.
# Node ID: [your-node-id-will-be-here]
You can optionally specify a different SSH port: irohssh server --ssh-port 2222
.
2. On your local machine (the one you want to connect from)
Use the nodeid
from the server to open a connection.
# Paste the ssh user and nodeid from the server
3. Connect with your SSH client
In a new terminal, use your standard ssh
client to connect to the local address provided by irohssh
.
# Use the address and port printed by irohssh
How It Works
irohssh server
: Starts an Iroh node, prints its uniquenodeid
, and listens for connections. For each incoming Iroh stream, it opens a corresponding TCP connection to the localsshd
and proxies all data between them.irohssh <NODE_ID>
: Starts a local TCP listener. When yourssh
client connects to it,irohssh
opens a stream to the targetnodeid
over the Iroh network and proxies data between your localssh
client and the remotesshd
.
This creates a secure end-to-end tunnel, with Iroh handling peer discovery and NAT traversal.
Build From Source
If you prefer to build from source, you can use cargo
.
License
Licensed under either of
- Apache License, Version 2.0
- MIT license at your option.