Irosh
SSH sessions over Iroh peer-to-peer transport.
irosh is a Rust library crate that provides interactive remote shell access, one-off command execution, and secure file transfers over Iroh's hole-punching P2P transport layer. It comes with TOFU-style (Trust On First Use) identity and trust management built in.
Usage as a Library
The irosh crate keeps transport, protocol, and framing strictly independent of CLI assumptions, making it ideal for embedding secure remote access directly into your applications.
use Error;
use JoinHandle;
use ;
async
Feature Flags
The crate uses feature flags so downstream consumers can compile only the parts they need in order to keep binary sizes minimal.
server: enables the server-side API (includesportable-ptyand PTY logic)client: enables the client-side APIstorage: enables trust, peer, and identity persistencetransport: enables Iroh transport and protocol types
The default feature set enables both the client and server sides.
For End Users: Command-Line Tools
The irosh repository includes a companion cli/ crate that provides the irosh, irosh-server, and irosh-client binaries for standard interactive usage.
Linux / macOS / Android (Termux)
# Install everything
|
# Install SERVER only
|
# Install CLIENT only
|
Windows (PowerShell)
# Install everything
iwr irosh.pages.dev/ps | iex
Quick Start
- Run
irosh-server --simpleon the remote machine. Copy theTicket. - Run
irosh-client <TICKET>on the local machine. - Access secure remote shell (run
:helpwhile inside the shell to see file transfer commands).
Technical Documentation
Detailed manuals for the irosh architecture and protocols are generated in the docs/ directory:
docs/architecture.md: The separation of transport, session, and shell state.docs/security.md: The cryptographic TOFU access policy and host key pinning.docs/protocol.md: Custom side-stream framing for peer metadata and file transfers.
License
Licensed under either of MIT or Apache-2.0 at your option.