Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 33 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ repository = "https://github.com/rustonbsd/iroh-ssh"
readme = "README.md"
keywords = ["networking"]
categories = ["network-programming"]
version = "0.2.5"
version = "0.2.6"
edition = "2024"

[dependencies]
anyhow = "1"
anyhow = "1.0.99"
iroh = "0.90.0"
ed25519-dalek = { version = "2.2.0", features = ["rand_core"] }
rand = "0.8"
tokio-stream = { version = "0.1.15", features = ["sync"] }
tracing = "0.1"
tracing-subscriber = "0.3"
tokio = { version = "1", features = [
tokio = { version = "1.47.1", features = [
"macros",
"io-util",
"sync",
Expand All @@ -29,7 +29,7 @@ homedir = "0.3.6"
whoami = "1.6.1"
z32 = "1.3"
runas = "1.2.0"
tempfile = "3.20.0"
tempfile = "3.21.0"

[profile.release]
opt-level = 3
Expand Down
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[Español](README_es.md) [Portuguese](README_pt.md)
# iroh-ssh

[![Crates.io](https://img.shields.io/crates/v/iroh-ssh.svg)](https://crates.io/crates/iroh-ssh)
Expand Down Expand Up @@ -34,25 +35,25 @@ cargo install iroh-ssh
Download and setup the binary automatically for your operating system from [GitHub Releases](https://github.com/rustonbsd/iroh-ssh/releases):

Linux
```bash
```bash
# Linux
wget https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.5/iroh-ssh.linux
wget https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.6/iroh-ssh.linux
chmod +x iroh-ssh.linux
sudo mv iroh-ssh.linux /usr/local/bin/iroh-ssh
```

macOS
```bash
# macOS arm
curl -LJO https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.5/iroh-ssh.macos
curl -LJO https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.6/iroh-ssh.macos
chmod +x iroh-ssh.macos
sudo mv iroh-ssh.macos /usr/local/bin/iroh-ssh
```

Windows
```bash
# Windows x86 64bit
curl -L -o iroh-ssh.exe https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.5/iroh-ssh.exe
curl -L -o iroh-ssh.exe https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.6/iroh-ssh.exe
mkdir %LOCALAPPDATA%\iroh-ssh
move iroh-ssh.exe %LOCALAPPDATA%\iroh-ssh\
setx PATH "%PATH%;%LOCALAPPDATA%\iroh-ssh"
Expand All @@ -66,7 +67,7 @@ Verify that the installation was successful

---

## Client Connection
## Client Connection

```bash
# Install for your distro (see above)
Expand All @@ -78,8 +79,6 @@ Works through any firewall, NAT, or private network. No configuration needed.

![Connecting to remote server](/media/t-rec_connect.gif)
<br>
(**video slightly out of date**)


---

Expand Down Expand Up @@ -129,11 +128,10 @@ Display its Node ID and share it to allow connection

![Starting server/Installing as service](/media/t-rec_server_service.gif)
<br>
(**video slightly out of date**)

## Connection information
```bash
// note: works only with persistent keys
// note: works only with persistent keys
> iroh-ssh info

Your iroh-ssh nodeid: 38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac
Expand All @@ -142,7 +140,7 @@ Display its Node ID and share it to allow connection

Your server iroh-ssh nodeid:
iroh-ssh my-user@38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac

Your service iroh-ssh nodeid:
iroh-ssh my-user@4fjeeiui4jdm96005255c3begj389xk3aeaeef6cfebd88344aa8c85e1dbfc1ad
```
Expand All @@ -155,20 +153,20 @@ Display its Node ID and share it to allow connection

```
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐ ┌─────────────┐
│ iroh-ssh │───▶│ internal TCP │───▶│ QUIC Tunnel │───▶│ iroh-ssh │
│ iroh-ssh │───▶│ internal TCP │───▶│ QUIC Tunnel │───▶│ iroh-ssh │
│ (your machine) │ Listener │ │ (P2P Network) │ │ server │
└─────────────┘ | (your machine) └─────────────────┘ └─────────────┘
└──────────────┘
│ ▲ │
▼ │ ▼
┌──────────────┐ ┌─────────────┐
⦜ -- ▶ │ run: ssh │ │ SSH Server │
⦜ -- ▶ │ run: ssh │ │ SSH Server │
│ user@localhost │ (port 22) │
└──────────────┘ └─────────────┘
```

1. **Client**: Creates local TCP listener, connects system SSH client to it
2. **Tunnel**: QUIC connection through Iroh's P2P network (automatic NAT traversal)
2. **Tunnel**: QUIC connection through Iroh's P2P network (automatic NAT traversal)
3. **Server**: Proxies connections to local SSH daemon running on (e.g. port localhost:22) (requires ssh server)
4. **Authentication**: Standard SSH security applies end-to-end. The tunnel is ontop of that an encrypted QUIC connection.

Expand Down Expand Up @@ -207,14 +205,14 @@ Display its Node ID and share it to allow connection
## Security Model

- **Node ID access**: Anyone with the Node ID can reach your SSH port
- **SSH authentication**: ATM only password auth is supported
- **SSH authentication**: SSH certificates and password auth are supported
- **Persistent keys**: Uses dedicated `.ssh/iroh_ssh_ed25519` keypair
- **QUIC encryption**: Transport layer encryption between endpoints

## Status

- [x] Password authentication
- [x] Persistent SSH keys
- [x] Persistent SSH keys
- [x] Linux service mode
- [x] Add howto gifs
- [x] Add -p flag for persistence
Expand Down
Loading
Loading