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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ or use ephemeral keys

```

Display its Node ID and share it to allow connection
Display its Endpoint ID and share it to allow connection

![Starting server/Installing as service](/media/t-rec_server_service.gif)
<br>
Expand All @@ -134,14 +134,14 @@ Display its Node ID and share it to allow connection
// note: works only with persistent keys
> iroh-ssh info

Your iroh-ssh nodeid: 38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac
Your iroh-ssh endpoint id: 38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac
iroh-ssh version 0.2.7
https://github.com/rustonbsd/iroh-ssh

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

Your service iroh-ssh nodeid:
Your service iroh-ssh endpoint id:
iroh-ssh my-user@4fjeeiui4jdm96005255c3begj389xk3aeaeef6cfebd88344aa8c85e1dbfc1ad
```

Expand Down Expand Up @@ -181,7 +181,7 @@ Display its Node ID and share it to allow connection
## Commands

```bash
# Get your Node ID and info
# Get your Endpoint ID and info
> iroh-ssh info

# Server modes
Expand All @@ -194,13 +194,13 @@ Display its Node ID and share it to allow connection
> iroh-ssh service uninstall # Uninstall service

# Client connection
> iroh-ssh user@<NODE_ID> # Connect to remote server
> iroh-ssh connect user@<NODE_ID> # Explicit connect command, works with all standard ssh params and flags
> iroh-ssh user@<ENDPOINT_ID> # Connect to remote server
> iroh-ssh connect user@<ENDPOINT_ID> # Explicit connect command, works with all standard ssh params and flags
```

## Security Model

- **Node ID access**: Anyone with the Node ID can reach your SSH port
- **Endpoint ID access**: Anyone with the Endpoint ID can reach your SSH port
- **SSH authentication**: SSH key file, certificate and password auth are supported
- **Persistent keys**: Uses dedicated `.ssh/iroh_ssh_ed25519` keypair
- **QUIC encryption**: Transport layer encryption between endpoints
Expand Down
24 changes: 12 additions & 12 deletions README_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ Descarga y configura automáticamente el binario para tu sistema operativo desde
Linux
```bash
# Linux
wget https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.6/iroh-ssh.linux
wget https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.7/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.6/iroh-ssh.macos
curl -LJO https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.7/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.6/iroh-ssh.exe
curl -L -o iroh-ssh.exe https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.7/iroh-ssh.exe
mkdir %LOCALAPPDATA%\iroh-ssh
move iroh-ssh.exe %LOCALAPPDATA%\iroh-ssh\
setx PATH "%PATH%;%LOCALAPPDATA%\iroh-ssh"
Expand Down Expand Up @@ -134,14 +134,14 @@ Mostrar su ID de nodo y compártalo para permitir la conexión
// nota: funciona solo con llaves persistentes
> iroh-ssh info

Your iroh-ssh nodeid: 38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac
iroh-ssh version 0.2.4
Your iroh-ssh endpoint id: 38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac
iroh-ssh version 0.2.7
https://github.com/rustonbsd/iroh-ssh

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

Your service iroh-ssh nodeid:
Your service iroh-ssh endpoint id:
iroh-ssh my-user@4fjeeiui4jdm96005255c3begj389xk3aeaeef6cfebd88344aa8c85e1dbfc1ad
```

Expand All @@ -155,7 +155,7 @@ Mostrar su ID de nodo y compártalo para permitir la conexión
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐ ┌─────────────┐
│ iroh-ssh │───▶│ Receptor │────▶│ Tunel QUIC │────▶│ servidor │
│ (Su máquina)│ │ Interno TCP │ │ (Red P2P) │ │ iroh-ssh │
└─────────────┘ │ (Su Este es un mismo documento en su versión en Ingles y Español. Hacer una versión de en portugués (universal, que favorezca portugués de Brasil, pero entendible en portugués de Portugal). Respetar el inglés existente donde están los comandos y código, tal y como está en la versión en Español.máquina) │ └─────────────────┘ └─────────────┘
└─────────────┘ │ (Su máquina) │ └─────────────────┘ └─────────────┘
└──────────────┘
│ ▲ │
▼ │ ▼
Expand Down Expand Up @@ -194,15 +194,15 @@ Mostrar su ID de nodo y compártalo para permitir la conexión
> iroh-ssh service uninstall # Desinstalar servicio

# Conexión de cliente
> iroh-ssh user@<NODE_ID> # Conectarse a un servidor remoto
> iroh-ssh connect user@<NODE_ID> # Comando de conexión explicito, funciona con todos los parametros y banderas ssh estándar
> iroh-ssh user@<ENDPOINT_ID> # Conectarse a un servidor remoto
> iroh-ssh connect user@<ENDPOINT_ID> # Comando de conexión explicito, funciona con todos los parametros y opciones ssh estándar
```

## Modelo de seguridad

- **Acceso por ID de Nodo**: Cualquier persona con el ID de Nodo puede acceder a su puerto SSH
- **Autenticación SSH**: Se admite la autenticación de contraseña y certificados SSH.
- **Claves persistentes**: Utiliza un par de claves dedicado en `.ssh/iroh_ssh_ed25519`
- **Autenticación SSH**: Se admite la autenticación de llave y certificados SSH.
- **Llaves persistentes**: Utiliza un par de llave dedicado en `.ssh/iroh_ssh_ed25519`
- **Cifrado QUIC**: Cifrado en la capa de transporte entre puntos finales

## Avances
Expand Down
18 changes: 9 additions & 9 deletions README_pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ Baixe e configure automaticamente o binário para o seu sistema operacional a pa
Linux
```bash
# Linux
wget https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.6/iroh-ssh.linux
wget https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.7/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.6/iroh-ssh.macos
curl -LJO https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.7/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.6/iroh-ssh.exe
curl -L -o iroh-ssh.exe https://github.com/rustonbsd/iroh-ssh/releases/download/0.2.7/iroh-ssh.exe
mkdir %LOCALAPPDATA%\iroh-ssh
move iroh-ssh.exe %LOCALAPPDATA%\iroh-ssh\
setx PATH "%PATH%;%LOCALAPPDATA%\iroh-ssh"
Expand Down Expand Up @@ -134,14 +134,14 @@ Exiba seu ID de nó e compartilhe-o para permitir a conexão
// nota: funciona apenas com chaves persistentes
> iroh-ssh info

Your iroh-ssh nodeid: 38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac
iroh-ssh version 0.2.4
Your iroh-ssh endpoint id: 38b7dc10df96005255c3beaeaeef6cfebd88344aa8c85e1dbfc1ad5e50f372ac
iroh-ssh version 0.2.7
https://github.com/rustonbsd/iroh-ssh

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

Your service iroh-ssh nodeid:
Your service iroh-ssh endpoint id:
iroh-ssh my-user@4fjeeiui4jdm96005255c3begj389xk3aeaeef6cfebd88344aa8c85e1dbfc1ad
```

Expand Down Expand Up @@ -194,8 +194,8 @@ Exiba seu ID de nó e compartilhe-o para permitir a conexão
> iroh-ssh service uninstall # Desinstalar serviço

# Conexão do cliente
> iroh-ssh user@<NODE_ID> # Conectar-se a um servidor remoto
> iroh-ssh connect user@<NODE_ID> # Comando de conexão explícito, funciona com todos os parâmetros e flags ssh padrão
> iroh-ssh user@<ENDPOINT_ID> # Conectar-se a um servidor remoto
> iroh-ssh connect user@<ENDPOINT_ID> # Comando de conexão explícito, funciona com todos os parâmetros e flags ssh padrão
```

## Modelo de segurança
Expand Down
16 changes: 8 additions & 8 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ pub async fn info_mode() -> anyhow::Result<()> {

if let Some(key) = server_key {
println!();
println!("Your server iroh-ssh nodeid:");
println!("Your server iroh-ssh endpoint id:");
println!(" iroh-ssh {}@{}", whoami::username(), key.clone().public());
println!();
}

if let Some(key) = service_key {
println!();
println!("Your service iroh-ssh nodeid:");
println!("Your service iroh-ssh endpoint id:");
println!(" iroh-ssh {}@{}", whoami::username(), key.clone().public());
println!();
}
Expand Down Expand Up @@ -84,7 +84,7 @@ pub async fn server_mode(server_args: ServerArgs, service: bool) -> anyhow::Resu
println!(
"\n iroh-ssh {}@{}\n",
whoami::username(),
iroh_ssh.node_id()
iroh_ssh.endpoint_id()
);
if server_args.persist {
let distro_home = my_home()?.ok_or_else(|| anyhow::anyhow!("home directory not found"))?;
Expand All @@ -109,12 +109,12 @@ pub async fn server_mode(server_args: ServerArgs, service: bool) -> anyhow::Resu

pub async fn proxy_mode(proxy_args: ProxyArgs) -> anyhow::Result<()> {
let iroh_ssh = IrohSsh::builder().accept_incoming(false).build().await?;
let endpoint_id = EndpointId::from_str(if proxy_args.node_id.len() == 64 {
&proxy_args.node_id
} else if proxy_args.node_id.len() > 64 {
&proxy_args.node_id[proxy_args.node_id.len() - 64..]
let endpoint_id = EndpointId::from_str(if proxy_args.endpoint_id.len() == 64 {
&proxy_args.endpoint_id
} else if proxy_args.endpoint_id.len() > 64 {
&proxy_args.endpoint_id[proxy_args.endpoint_id.len() - 64..]
} else {
return Err(anyhow::anyhow!("invalid node id length"));
return Err(anyhow::anyhow!("invalid endpoint id length"));
})?;
iroh_ssh.connect(endpoint_id).await
}
Expand Down
10 changes: 5 additions & 5 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{ffi::OsString, path::PathBuf};

use clap::{ArgAction, Args, Parser, Subcommand, command};

const TARGET_HELP: &str = "Target in the form user@NODE_ID";
const TARGET_HELP: &str = "Target in the form user@ENDPOINT_ID";

#[derive(Parser, Debug)]
#[command(name = "iroh-ssh", about = "ssh without ip")]
Expand Down Expand Up @@ -39,8 +39,8 @@ pub enum Cmd {

#[derive(Args, Clone, Debug)]
pub struct ProxyArgs {
#[arg(help = "Proxy node ID")]
pub node_id: String,
#[arg(help = "Proxy Endpoint ID")]
pub endpoint_id: String,
}

#[derive(Args, Clone, Debug)]
Expand Down Expand Up @@ -78,11 +78,11 @@ pub struct SshOpts {
pub identity_file: Option<PathBuf>,

#[arg(short = 'L', value_name = "LPORT:HOST:RPORT",
help = "Local forward [bind_addr:]lport:host:rport (host can't be node_id yet)", action = ArgAction::Append)]
help = "Local forward [bind_addr:]lport:host:rport (host can't be endpoint_id yet)", action = ArgAction::Append)]
pub local_forward: Vec<String>,

#[arg(short = 'R', value_name = "RPORT:HOST:LPORT",
help = "Remote forward [bind_addr:]rport:host:lport (host can't be node_id yet)", action = ArgAction::Append)]
help = "Remote forward [bind_addr:]rport:host:lport (host can't be endpoint_id yet)", action = ArgAction::Append)]
pub remote_forward: Vec<String>,

#[arg(
Expand Down
2 changes: 1 addition & 1 deletion src/ssh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl IrohSsh {
Ok(())
}

pub fn node_id(&self) -> EndpointId {
pub fn endpoint_id(&self) -> EndpointId {
self.inner
.as_ref()
.expect("inner not set")
Expand Down