# michelbsbfranca/ssh-remote architecture

> Architecture diagram of the GitHub repository michelbsbfranca/ssh-remote, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/michelbsbfranca/ssh-remote
- Repository: https://github.com/michelbsbfranca/ssh-remote

## Overview

SSH Remote is a desktop SSH client for managing saved connection profiles and opening interactive connections in terminal tabs. The main workflow is selecting or creating a session, then opening a tab that authenticates to a remote host and exchanges terminal input and output. Supporting capabilities include category organization, encrypted credentials, saved UI preferences, and host reachability indicators. The app excerpt is partial, so some wiring is documented or indexed rather than directly visible; uncertain links are omitted or marked unverified.

Main entry points: [`ssh_remote/app.py`](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/app.py) (Main window), [`ssh_remote/crypto.py`](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/crypto.py) (Credential encryption), [`ssh_remote/session_manager.py`](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/session_manager.py) (Session manager), [`ssh_remote/category_manager.py`](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/category_manager.py) (Category manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_app["Main window<br/>[app.py]"]
  node_dialogs["Dialogs<br/>[dialogs.py]"]
end

subgraph group_profiles["Session management"]
  node_sessions["Session manager<br/>[session_manager.py]"]
  node_categories["Category manager"]
  node_reachability["Host reachability<br/>[network.py]"]
end

subgraph group_connection["SSH connection"]
  node_terminal["Tabbed terminal<br/>[terminal.py]"]
  node_sshhost(("SSH host"))
end

subgraph group_persistence["Local persistence"]
  node_crypto["Credential encryption<br/>[crypto.py]"]
  node_preferences["UI preferences<br/>[preferences.py]"]
  node_localdata[("Local config files")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"manages sessions"| node_sessions
node_app -.->|"organizes sessions"| node_categories
node_app -->|"opens session tab"| node_terminal
node_app -->|"shows prompts"| node_dialogs
node_app -.->|"checks hosts"| node_reachability
node_app -->|"loads and saves"| node_preferences
node_sessions -->|"encrypts credentials"| node_crypto
node_preferences -->|"prepares config directory"| node_crypto
node_categories -->|"prepares config directory"| node_crypto
node_sessions -->|"reads and writes"| node_localdata
node_categories -->|"reads and writes"| node_localdata
node_preferences -->|"reads and writes"| node_localdata
node_crypto -->|"stores key"| node_localdata
node_terminal -->|"opens SSH shell"| node_sshhost
node_terminal -->|"reports connection errors"| node_dialogs

click node_app "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/app.py"
click node_dialogs "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/dialogs.py"
click node_sessions "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/session_manager.py"
click node_categories "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/category_manager.py"
click node_reachability "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/network.py"
click node_terminal "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/terminal.py"
click node_crypto "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/crypto.py"
click node_preferences "https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/preferences.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_dialogs,node_user toneBlue
class node_sessions,node_categories,node_reachability toneAmber
class node_terminal,node_sshhost toneMint
class node_crypto,node_preferences,node_localdata toneRose
```

## Components

### Desktop interface

- [Main window](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/app.py): `ssh_remote/app.py`
- [Dialogs](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/dialogs.py): `ssh_remote/dialogs.py`

### Session management

- [Session manager](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/session_manager.py): `ssh_remote/session_manager.py`
- [Category manager](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/category_manager.py): `ssh_remote/category_manager.py`
- [Host reachability](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/network.py): `ssh_remote/network.py`

### SSH connection

- [Tabbed terminal](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/terminal.py): `ssh_remote/terminal.py`
- **SSH host**

### Local persistence

- [Credential encryption](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/crypto.py): `ssh_remote/crypto.py`
- [UI preferences](https://github.com/michelbsbfranca/ssh-remote/blob/main/ssh_remote/preferences.py): `ssh_remote/preferences.py`
- **Local config files**

### Other components

- **User**

## Connections

- User → Main window: uses (evidence: `README.md`)
- Main window → Session manager: manages sessions (evidence: `ssh_remote/app.py`)
- Main window → Category manager: organizes sessions (evidence: `ssh_remote/app.py`)
- Main window → Tabbed terminal: opens session tab (evidence: `README.md`)
- Main window → Dialogs: shows prompts (evidence: `ssh_remote/app.py`)
- Main window → Host reachability: checks hosts (evidence: `ssh_remote/app.py`)
- Main window → UI preferences: loads and saves (evidence: `ssh_remote/app.py`)
- Session manager → Credential encryption: encrypts credentials (evidence: `ssh_remote/session_manager.py`)
- UI preferences → Credential encryption: prepares config directory (evidence: `ssh_remote/preferences.py`)
- Category manager → Credential encryption: prepares config directory (evidence: `ssh_remote/category_manager.py`)
- Session manager → Local config files: reads and writes (evidence: `ssh_remote/session_manager.py`)
- Category manager → Local config files: reads and writes (evidence: `ssh_remote/category_manager.py`)
- UI preferences → Local config files: reads and writes (evidence: `ssh_remote/preferences.py`)
- Credential encryption → Local config files: stores key (evidence: `ssh_remote/crypto.py`)
- Tabbed terminal → SSH host: opens SSH shell (evidence: `ssh_remote/terminal.py`)
- Tabbed terminal → Dialogs: reports connection errors (evidence: `ssh_remote/terminal.py`)
