Full interactive terminal via SwiftTerm, About sheet, English docs

This commit is contained in:
x3
2026-09-22 10:19:25 +02:00
parent d0855ab45d
commit c657ec2825
15 changed files with 584 additions and 650 deletions
+33 -33
View File
@@ -1,46 +1,46 @@
# Benutzung
# Usage
## Layout (wie Remmina)
- **Links:** Gruppen-Dropdown, Suche, Profil-Liste. Rechtsklick: Verbinden / Duplizieren / Bearbeiten / Löschen. Doppelklick verbindet.
- **Rechts:** Tabs aller offenen Sitzungen + Verbindungsdetails (kopierbarer Befehl) + Hinweis-Box.
- **Unten:** Statusbar mit Profil-/Sitzungs-Zähler.
- **Toolbar:** `+` Neu, Stift Bearbeiten, Kopie-Symbol Duplizieren, Schlüssel Keys, `▶` Verbinden, `⚡` Quick-Connect.
## Layout (Remmina-style)
- **Left:** group dropdown, search, profile list. Right-click: Connect / Duplicate / Edit / Delete. Double-click connects.
- **Right:** tabs for open sessions + connection details (copyable command) + info box.
- **Bottom:** status bar with profile/session counts.
- **Toolbar:** `+` New, pencil Edit, copy Duplicate, key SSH keys, `ⓘ` About, `▶` Connect, `⚡` Quick-Connect.
## Profil anlegen
1. `+` → Name, Gruppe, Protokoll (SSH/SFTP/RDP/VNC), Host, Port, Benutzername, **Passwort direkt darunter** ausfüllen (Keychain-Haken setzen zum Speichern).
2. Der Editor warnt live bei typischen Fehlern: `user@host` im Host-Feld, `ssh://`-Präfix, Leerzeichen, leerer Benutzername, ungültiger Port. Beim Speichern wird getrimmt.
3. SSH-Key wählen (optional, Bereich darunter — vorher unter Schlüssel-Icon importieren).
4. Speichern → liegt sofort in `profiles.json`.
5. Schlägt eine Verbindung fehl: rotes Banner → **Bericht kopieren** und zur Fehlersuche mitschicken (enthält kein Passwort).
## Creating a profile
1. `+` → name, group, protocol (SSH/SFTP/RDP/VNC), host, port, username, **password right below** (check Keychain to save it).
2. The editor warns live about common mistakes: `user@host` in the host field, `ssh://` prefix, whitespace, empty username, invalid port. Values are trimmed on save.
3. Pick an SSH key (optional, section below — import it first via the key icon).
4. Save → stored immediately in `profiles.json`.
5. If a connection fails: red banner → **Copy report** and send it in for debugging (contains no password).
## Verbinden
- Profil wählen → `▶ Verbinden` oder Doppelklick.
- SSH/SFTP: **In-App-Terminal (Dracula-Theme) direkt im Tab** — erst TCP-Vorab-Check (falscher Port/Host → sofort klare Meldung statt kryptischem Exit-Code), dann Auto-Connect. Eingabezeile unten (Auge-Icon = Passwort-Modus), `^C`/`^D`-Buttons, `Leeren`, `Trennen`/`Verbinden`, `Tab schließen`. Bei Fehlschlag: rotes Banner mit letzter Meldung + Diagnose-Button.
- Alternativ: `In Terminal.app öffnen` (öffnet eine `.command`-Datei, braucht keine Automation-Berechtigung) oder `Befehl kopieren`.
- RDP: startet `xfreerdp` (falls vorhanden) oder öffnet MS Remote Desktop.
- VNC: öffnet `vnc://host:port`.
## Connecting
- Select a profile → `▶ Connect` or double-click.
- SSH/SFTP: **full terminal tab** (SwiftTerm, Dracula theme). Flow: TCP pre-check (wrong port/host → instant plain-language message instead of a cryptic exit code) → host-key fingerprint popup on first connect → auto-connect. Type directly in the terminal: Tab completion, arrows, Ctrl+C, copy/paste, scrollback, vim/htop all work. Buttons: Disconnect/Reconnect, Clear, Close tab. On failure: red banner with last message + Diagnose button.
- Alternative: `Open in Terminal.app` (opens a `.command` file, no automation permission needed) or `Copy command`.
- RDP: launches `xfreerdp` (if present) or opens Microsoft Remote Desktop.
- VNC: opens `vnc://host:port`.
## SSH-Keys verwalten (Schlüssel-Icon)
- `Import aus ~/.ssh`: übernimmt alle privaten Keys (ohne `*.pub`, `known_hosts`, `config`).
- `Wählen…`: Picker für Key-Datei.
- `Neuen Key generieren`: ruft `/usr/bin/ssh-keygen -t ed25519 -f ~/.ssh/remminamac_<timestamp>` auf.
## Managing SSH keys (key icon)
- `Import from ~/.ssh`: picks up all private keys (skips `*.pub`, `known_hosts`, `config`).
- `Choose…`: file picker for a key file.
- `Generate new key`: runs `/usr/bin/ssh-keygen -t ed25519 -f ~/.ssh/remminamac_<timestamp>`.
- Passphrase → Keychain (`sshkey-<UUID>`).
## Host-Key prüfen & akzeptieren (Popup)
- Bei Erstverbindung zeigt die App ein Popup mit SHA256-/MD5-Fingerprint (per `ssh-keyscan` geholt) — mit Terminal-Ausgabe oder Admin-Angabe vergleichen, dann Akzeptieren & Verbinden (landet in `~/.ssh/known_hosts`, gemeinsam mit Terminal.app).
- Bei GEÄNDERTEM Key: rote Warnung (MITM möglich!) — nur ersetzen, wenn erwartet (Server neu aufgesetzt). Zurücksetzen auch manuell: `ssh-keygen -R HOST`.
- Technik: `Sources/ctty-run/ctty-run.c` gibt ssh ein Controlling-Terminal (sonst scheitern alle interaktiven Prompts still).
## Host-key verification (popup)
- On first connect the app shows a popup with the SHA256/MD5 fingerprint (fetched via `ssh-keyscan`) — compare it with Terminal output or the server admin's value, then Accept & connect (stored in `~/.ssh/known_hosts`, shared with Terminal.app).
- On CHANGED key: red warning (possible MITM!) — only replace if expected (freshly provisioned server). Manual reset: `ssh-keygen -R HOST`.
- Tech note: `Sources/ctty-run/ctty-run.c` gives ssh a controlling terminal (without it all interactive prompts fail silently).
## Passwort speichern & Auto-Login
- Im Profil-Editor: Passwort eingeben + „in Keychain speichern“. Gespeichertes Passwort wird angezeigt (✓) und kann gelöscht werden. In `profiles.json` steht nur die Referenz, nie das Passwort.
- Reihenfolge beim Verbinden: Profil-Passwort zuerst, sonst Key-Passphrase.
- **Auto-Login ohne Tippen:** braucht `sshpass` (`brew install sshpass`). Dann loggt ssh via Keychain-Secret ein (Passwort nur im Prozess-Env `SSHPASS`, nie in Befehlszeile/Logs). Status zeigt „Auto-Login via Keychain".
- **Ohne sshpass:** Passwort/Key-Passphrase wird interaktiv im Terminal abgefragt (Passwort-Modus: Auge-Icon). Bei Sonderzeichen im Passwort immer Auge-Modus nutzen (keine Text-Ersetzung).
## Saving passwords & auto-login
- Profile editor: enter password + check Keychain. A saved password is indicated (✓) and can be deleted. `profiles.json` holds only the reference, never the password.
- Order at connect time: profile password first, key passphrase second.
- **Auto-login without typing:** needs `sshpass` (`brew install sshpass`). ssh logs in with the Keychain secret (password only in the `SSHPASS` process env, never on the command line or in logs). Status shows auto-login state.
- **Without sshpass:** password/key passphrase is asked interactively in the terminal.
## Quick-Connect
- Mit Auswahl: verbindet direkt. Ohne Auswahl: öffnet Editor mit „Quick-Connect“-Vorlage.
- With selection: connects directly. Without: opens the editor with a “Quick-Connect” template.
## Export / Import (manuell, bis GUI-Buttons kommen)
## Export / Import (manual until GUI buttons land)
```bash
PROFILE_DIR=~/Library/Application\ Support/RemminaMac
cp "$PROFILE_DIR/profiles.json" ~/Desktop/remminamac-backup.json