diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8136333..847996a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,8 @@ jobs: - run: go vet ./... && go test ./... - name: Terminal-Emulator (eigene Kopie in third_party/vt) run: cd third_party/vt && go test ./... + - name: Lasttest mit 1000 Hosts + run: make loadtest # Bildschirm-Tests: abweichende Bilder zum Ansehen hochladen - uses: actions/upload-artifact@v4 if: failure() diff --git a/Makefile b/Makefile index aa41f6f..b8ea694 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ PKG := github.com/db9979/sshtermy/internal/version LDFLAGS := -s -w -X $(PKG).Version=$(VERSION) -X $(PKG).Commit=$(COMMIT) -X $(PKG).Date=$(DATE) -X $(PKG).UpdatePubKey=$(UPDATE_PUBKEY) TARGETS := windows/arm64 windows/386 windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 linux/arm linux/riscv64 -.PHONY: build test bench dist clean run golden handout fuzz vuln +.PHONY: build test bench loadtest dist clean run golden handout fuzz vuln build: CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o bin/sshtermy ./cmd/sshtermy @@ -18,6 +18,10 @@ test: bench: go test -run '^$$' -bench . -benchtime 2s ./internal/termemu ./internal/ui ./internal/store +# Lasttest mit 1000 Hosts (Manager, Palette, Online-Prüfung, Broadcast, Sync, MCP) +loadtest: + SSHTERMY_LOAD=1 go test -run TestLoad1000 -v -count=1 ./internal/ui + # Fuzz-Tests (Parser für Daten von fremden Geräten), je FUZZTIME lang FUZZTIME ?= 20s fuzz: diff --git a/README.de.md b/README.de.md index dbc8e07..3bc5124 100644 --- a/README.de.md +++ b/README.de.md @@ -205,6 +205,8 @@ sshtermy mcp # MCP-Server für KI-Clients (stdin/stdout), siehe „ ## Bedienung +📖 **Handbuch & FAQ** (Einrichtung, KI-Datenschutz, Netzwerkgeräte, Umzug, MCP): [db9979.github.io/sshtermy/de/handbuch.html](https://db9979.github.io/sshtermy/de/handbuch.html) · Palette › Hilfe › „Handbuch & FAQ“ + 🖨 **Kurzreferenz zum Ausdrucken** (A4, 2 Seiten): [Deutsch (PDF)](https://db9979.github.io/sshtermy/handout/sshtermy-kurzreferenz-de.pdf) · [English (PDF)](https://db9979.github.io/sshtermy/handout/sshtermy-quickref-en.pdf) | Wo | Taste | Wirkung | @@ -544,6 +546,7 @@ Claude Desktop (`claude_desktop_config.json`): `{"mcpServers": {"sshtermy": {"co ``` make test # go vet + Tests make bench # Leistung: Terminal-Durchsatz, Speicher pro Tab, Manager mit 500 Verbindungen +make loadtest # Lasttest: 1000 Hosts (Store, Manager, Palette, Broadcast, Sync, MCP) make build # bin/sshtermy make dist # alle Plattformen nach dist/ + checksums.txt make fuzz # Fuzz-Tests für Parser von Daten fremder Geräte (FUZZTIME=5m für länger) diff --git a/README.md b/README.md index 3dba78c..65e10c9 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,8 @@ sshtermy mcp # MCP server for AI clients (stdin/stdout), see “sshT ## Usage +📖 **Manual & FAQ** (setup, AI privacy, network devices, moving to a new computer, MCP): [db9979.github.io/sshtermy/manual.html](https://db9979.github.io/sshtermy/manual.html) · palette › Help › “Manual & FAQ” + 🖨 **Printable quick reference** (A4, 2 pages): [English PDF](https://db9979.github.io/sshtermy/handout/sshtermy-quickref-en.pdf) · [German PDF](https://db9979.github.io/sshtermy/handout/sshtermy-kurzreferenz-de.pdf) | Where | Key | Effect | @@ -541,6 +543,7 @@ Claude Desktop (`claude_desktop_config.json`): `{"mcpServers": {"sshtermy": {"co ``` make test # go vet + tests make bench # performance: terminal throughput, memory per tab, manager with 500 connections +make loadtest # load test: 1000 hosts (store, manager, palette, broadcast, sync, MCP) make build # bin/sshtermy make dist # all platforms to dist/ + checksums.txt make fuzz # fuzz tests for parsers of data from foreign devices (FUZZTIME=5m for longer) diff --git a/internal/i18n/en_manual.go b/internal/i18n/en_manual.go new file mode 100644 index 0000000..43a2a84 --- /dev/null +++ b/internal/i18n/en_manual.go @@ -0,0 +1,10 @@ +package i18n + +// Handbuch auf der Webseite (Palette › Hilfe). +func init() { + for k, v := range map[string]string{ + "Handbuch & FAQ (Webseite)": "Manual & FAQ (website)", + } { + en[k] = v + } +} diff --git a/internal/ui/changelog.go b/internal/ui/changelog.go index 65c5e85..555e696 100644 --- a/internal/ui/changelog.go +++ b/internal/ui/changelog.go @@ -166,3 +166,13 @@ func (a *App) doRestart() tea.Cmd { // Restart: soll main nach dem Beenden die neue Version starten? func (a *App) Restart() bool { return a.restart } + +// manualURL: Handbuch auf der Webseite in der eingestellten Sprache. +func manualURL() string { + if i18n.Lang() == "de" { + return "https://db9979.github.io/sshtermy/de/handbuch.html" + } + return "https://db9979.github.io/sshtermy/manual.html" +} + +var openManual = func() { _ = sshx.OpenBrowser(manualURL()) } diff --git a/internal/ui/load_test.go b/internal/ui/load_test.go new file mode 100644 index 0000000..f4707cb --- /dev/null +++ b/internal/ui/load_test.go @@ -0,0 +1,169 @@ +package ui + +import ( + "context" + "encoding/json" + "fmt" + "os" + "sort" + "strings" + "testing" + "time" + + "github.com/db9979/sshtermy/internal/broadcast" + "github.com/db9979/sshtermy/internal/domain" + "github.com/db9979/sshtermy/internal/sshx" + "github.com/db9979/sshtermy/internal/store" + "github.com/db9979/sshtermy/internal/syncx" +) + +// Lasttest mit 1000 Hosts: make loadtest (SSHTERMY_LOAD=1). Misst die +// Stellen, die mit der Zahl der Verbindungen wachsen, und schlägt fehl, +// wenn eine davon spürbar zäh wird. Die Grenzen sind großzügig (langsame +// CI-Rechner); die gemessenen Zeiten stehen im Testprotokoll. + +const loadHosts = 1000 + +type loadFake struct{} + +func (loadFake) NetDevice() bool { return false } +func (loadFake) Learned() bool { return false } +func (loadFake) Close() error { return nil } +func (loadFake) Exec(context.Context, string) (sshx.RunResult, error) { + time.Sleep(2 * time.Millisecond) + return sshx.RunResult{Output: []byte(strings.Repeat("Filesystem 1K-blocks Used Available Use% Mounted on\n", 20))}, nil +} +func (loadFake) RunInShell(context.Context, []string) (sshx.RunResult, error) { + return sshx.RunResult{}, nil +} + +func TestLoad1000(t *testing.T) { + if os.Getenv("SSHTERMY_LOAD") == "" { + t.Skip("Lasttest: make loadtest") + } + type row struct { + what string + took time.Duration + limit time.Duration + } + var rows []row + measure := func(what string, limit time.Duration, runs int, f func()) { + t.Helper() + ds := make([]time.Duration, runs) + for i := range ds { + t0 := time.Now() + f() + ds[i] = time.Since(t0) + } + sort.Slice(ds, func(i, j int) bool { return ds[i] < ds[j] }) + rows = append(rows, row{what, ds[len(ds)/2], limit}) // Median + } + + var a *App + measure("Store: 1000 Verbindungen anlegen", 5*time.Second, 1, func() { a = manyConnsApp(t, loadHosts) }) + measure("Store: öffnen und entsperren", 5*time.Second, 1, func() { + st, err := store.Open() + if err != nil { + t.Fatal(err) + } + if err := st.V.UnlockPassword([]byte("correct horse")); err != nil { + t.Fatal(err) + } + if err := st.AfterUnlock(); err != nil { + t.Fatal(err) + } + if n := len(st.Connections()); n != loadHosts { + t.Fatalf("%d Verbindungen", n) + } + }) + measure("Manager: ein Bild", 60*time.Millisecond, 15, func() { a.View() }) + a.mgr.search.SetValue("srv-9") + measure("Manager: Bild mit Suchtext", 60*time.Millisecond, 15, func() { a.View() }) + a.mgr.search.SetValue("") + measure("Palette: öffnen + unscharf suchen", 100*time.Millisecond, 9, func() { + a.openPalette() + a.pal.in.SetValue("k5 st1 r3") + _ = a.paletteItems() + a.View() + a.pal = nil + }) + measure("Verbindung speichern (eine ändern)", 300*time.Millisecond, 5, func() { + c := a.st.Connections()[500] + c.Tags = append(c.Tags, "x") + if _, err := a.st.UpsertConnection(c); err != nil { + t.Fatal(err) + } + }) + + // Online-Punkt: 1000 Adressen, Verbindung wird sofort abgewiesen. + conns := a.st.Connections() + probe := make([]domain.Connection, len(conns)) + for i, c := range conns { + c.Host, c.Port = "127.0.0.1", 20000+i + probe[i] = c + } + measure("Online-Prüfung: 1000 Adressen", 15*time.Second, 1, func() { + if n := len(checkReach(probe)); n != loadHosts { + t.Fatalf("%d Ergebnisse", n) + } + }) + + // Broadcast an alle 1000 (Ausführung simuliert) und das Bild dazu. + var rs []broadcast.Result + measure("Broadcast: 1000 Hosts (je 2 ms, 32 parallel)", 10*time.Second, 1, func() { + rs = broadcast.Run(context.Background(), broadcast.Job{Conns: conns, Steps: []string{"df -h"}, Parallel: 32}, + func(context.Context, domain.Connection) (broadcast.Executor, error) { return loadFake{}, nil }, func(int, broadcast.Result) {}) + }) + if ok, failed, _ := broadcast.Summary(rs); ok != loadHosts || failed != 0 { + t.Fatalf("Broadcast: %d ok, %d Fehler", ok, failed) + } + a.openBroadcast() + a.bc.targets, a.bc.steps, a.bc.results, a.bc.phase = conns, []string{"df -h"}, rs, bcRun + measure("Broadcast: Ergebnisbild", 100*time.Millisecond, 9, func() { a.View() }) + a.scr = scrManager + + // Sync: zwei Stände mit je 1000 Verbindungen zusammenführen. + d, _, err := a.st.Snapshot() + if err != nil { + t.Fatal(err) + } + measure("Sync: 1000 + 1000 zusammenführen", 2*time.Second, 3, func() { + p := syncx.FromData(d, nil) + q := syncx.FromData(d, nil) + if m := syncx.Merge(p, q, time.Now()); len(m.Connections) != loadHosts { + t.Fatalf("Sync: %d", len(m.Connections)) + } + }) + + a.st.UpdateSettings(func(s *domain.Settings) { s.MCP = mcpRead }) + measure("MCP: list_connections", 300*time.Millisecond, 5, func() { + var out string + a.onMCP(mcpCallMsg{tool: "list_connections", args: json.RawMessage(`{}`), reply: func(s string, _ error) { out = s }}) + if strings.Count(out, `"alias"`) != loadHosts { + t.Fatal("MCP-Liste unvollständig") + } + }) + + var b strings.Builder + fmt.Fprintf(&b, "\n%-46s %10s %10s\n", "Lasttest mit 1000 Hosts", "Median", "Grenze") + for _, r := range rows { + mark := "" + if r.took > r.limit { + mark = " ZU LANGSAM" + t.Errorf("%s: %v (Grenze %v)", r.what, r.took, r.limit) + } + fmt.Fprintf(&b, "%-46s %10s %10s%s\n", r.what, r.took.Round(time.Microsecond*100), r.limit, mark) + } + t.Log(b.String()) +} + +// 1000 nicht antwortende Hosts: mehr gleichzeitig prüfen, längere Pause. +func TestReachScaling(t *testing.T) { + if reachParFor(10) != reachPar || reachParFor(1000) != 62 || reachParFor(5000) != reachParMax { + t.Fatalf("parallel: %d %d %d", reachParFor(10), reachParFor(1000), reachParFor(5000)) + } + round := time.Duration(loadHosts/reachParFor(loadHosts)+1) * reachTimeout // ~34 s + if p := reachPause(round); p < 3*round || reachPause(time.Second) != reachEvery { + t.Fatalf("Pause: %v", p) + } +} diff --git a/internal/ui/palette.go b/internal/ui/palette.go index a2e2708..580d2ba 100644 --- a/internal/ui/palette.go +++ b/internal/ui/palette.go @@ -652,6 +652,7 @@ func (a *App) palMenuItems() []palItem { palItem{group: pgHelp, menu: "help", icon: ic("help"), label: i18n.T("Tastenkürzel anzeigen"), hint: a.keys.label(actHelp), keys: "help keys", run: func() tea.Cmd { a.modal = a.helpModal(); return nil }}, palItem{group: pgHelp, menu: "help", icon: ic("tour"), label: i18n.T("Einführungstour"), hint: i18n.T("5 Schritte"), keys: "tour", run: func() tea.Cmd { a.modal = a.tourModal(); return nil }}, + palItem{group: pgHelp, menu: "help", icon: ic("help"), label: i18n.T("Handbuch & FAQ (Webseite)"), hint: "web", keys: "manual handbuch faq docs", run: func() tea.Cmd { openManual(); return nil }}, palItem{group: pgHelp, menu: "help", icon: ic("news"), label: i18n.T("Was ist neu (Changelog)"), hint: a.keys.label(actAbout) + " w", run: func() tea.Cmd { a.modal = a.changelogModal(nil); return nil }}, palItem{group: pgHelp, menu: "help", icon: ic("export"), label: i18n.T("Debug-Protokoll bereinigt speichern (für Fehlerbericht)"), hint: ".txt", keys: "debug log protokoll fehler bug support issue", run: func() tea.Cmd { return a.exportDebug() }}, diff --git a/internal/ui/reach.go b/internal/ui/reach.go index 4410d4e..7deaf91 100644 --- a/internal/ui/reach.go +++ b/internal/ui/reach.go @@ -24,9 +24,18 @@ import ( const ( reachEvery = time.Minute reachTimeout = 2 * time.Second - reachPar = 16 + reachPar = 16 // gleichzeitig, bei vielen Hosts mehr (reachParFor) + reachParMax = 64 ) +// reachParFor: bei 1000 Hosts dauert eine Runde mit 16 gleichzeitigen +// Prüfungen und 2 s Zeitlimit sonst über zwei Minuten. +func reachParFor(n int) int { return min(reachParMax, max(reachPar, n/16)) } + +// reachPause: Pause bis zur nächsten Runde, mindestens eine Minute, bei +// langen Runden das Dreifache der Dauer (Netz und Firewalls nicht fluten). +func reachPause(took time.Duration) time.Duration { return max(reachEvery, 3*took) } + type reachResult struct { ok bool rtt time.Duration @@ -38,6 +47,7 @@ type reachState struct { res map[string]reachResult // Connection.ID → letzte Prüfung running bool next time.Time + started time.Time } type reachMsg struct{ res map[string]reachResult } @@ -63,7 +73,7 @@ func (a *App) reachTick() tea.Cmd { if len(todo) == 0 && len(via) == 0 { return nil } - a.reach.running = true + a.reach.running, a.reach.started = true, time.Now() return func() tea.Msg { res := checkReach(todo) if len(via) > 0 { @@ -77,10 +87,26 @@ func (a *App) reachTick() tea.Cmd { func checkReach(conns []domain.Connection) map[string]reachResult { out := make(map[string]reachResult, len(conns)) + // gleiche Adresse (mehrere Benutzer auf einem Host): nur einmal prüfen + byAddr := map[string][]string{} + var uniq []domain.Connection + for _, c := range conns { + if _, seen := byAddr[c.Addr()]; !seen { + uniq = append(uniq, c) + } + byAddr[c.Addr()] = append(byAddr[c.Addr()], c.ID) + } + defer func() { + for _, c := range uniq { + for _, id := range byAddr[c.Addr()][1:] { + out[id] = out[c.ID] + } + } + }() var mu sync.Mutex var wg sync.WaitGroup - sem := make(chan struct{}, reachPar) - for _, c := range conns { + sem := make(chan struct{}, reachParFor(len(uniq))) + for _, c := range uniq { wg.Add(1) sem <- struct{}{} go func(c domain.Connection) { @@ -120,6 +146,9 @@ func reachReason(err error) string { func (a *App) onReach(m reachMsg) { a.reach.running = false + if !a.reach.started.IsZero() { + a.reach.next = time.Now().Add(reachPause(time.Since(a.reach.started))) + } if a.reach.res == nil { a.reach.res = map[string]reachResult{} } diff --git a/site/de/handbuch.html b/site/de/handbuch.html new file mode 100644 index 0000000..c06387c --- /dev/null +++ b/site/de/handbuch.html @@ -0,0 +1,229 @@ + + + + + +sshTermy – Handbuch und FAQ + + + + + + +
+
+ + +
EN · DE
+
+
+ +
+ + +
+
+

Handbuch

+

Alles Wichtige zu sshTermy an einer Stelle. Zum Ausdrucken gibt es die Kurzreferenz (PDF); jede Taste lässt sich mit F1 auch in der App nachschlagen.

+

Erste Schritte

+
    +
  1. Installieren – siehe Installation. sshTermy ist eine einzige Datei für Windows, macOS und Linux.
  2. +
  3. Master-Passwort anlegen. Beim ersten Start legst du ein Passwort für den verschlüsselten Store fest (Argon2id + AES-256-GCM). Es wird nie gespeichert. Unter Windows kann zusätzlich die Windows-Anmeldung entsperren (DPAPI).
  4. +
  5. Verbindungen holen: i im Manager importiert aus ~/.ssh/config, PuTTY, MobaXterm, Ansible-Inventaren oder CSV. Oder n für eine neue Verbindung.
  6. +
  7. KI einrichten (optional): s im Manager. Anbieter wählen (eigener Server, Ollama, OpenAI, Claude), Strg+T testet.
  8. +
  9. Verbinden: Verbindung wählen, ⏎. F10 bringt dich zurück in den Manager, die Sitzung läuft weiter.
  10. +
+

Fast alles findest du über die Befehlspalette Strg+Leertaste: tippen, was du suchst, z. B. „sperren“, „audit“ oder „matrix“.

+
+ +
+

Verbindungen

+

Im Formular (n/e) stehen oben nur Name, Adresse, Benutzer und Anmeldung; „Erweitert“ öffnet Jump-Host, Tags, Ordner, Gerätetyp, Tastaturkürzel und mehr.

+
    +
  • Anmeldung: Passwort (verschlüsselt im Store oder im Schlüsselbund des Systems), Schlüsseldatei (auch PuTTY .ppk), SSH-Agent, Sicherheitsschlüssel (FIDO), Zertifikate. c im Manager erzeugt einen Schlüssel und überträgt ihn auf den Server.
  • +
  • Ordner und Tags: o legt Ordner an („Kunde / Standort“ verschachtelt), Ziehen mit der Maus sortiert. #tag in der Suche filtert.
  • +
  • Jump-Host: Verbindung über einen anderen Server; sshTermy merkt sich, welcher Jump-Host für welches Netz passt.
  • +
  • Telnet, seriell, lokal: „Verbindungsart“ wählt Telnet, ein USB-Konsolenkabel oder die Shell dieses Rechners (Alt+L).
  • +
  • Feste Sitzung: pro Verbindung immer in derselben tmux/screen-Sitzung landen, auch von einem anderen Rechner.
  • +
+
+ +
+

Terminal und Tabs

+
    +
  • F7/F8 wechseln Tabs, Alt+T zeigt alle, Alt+N/Alt+W öffnen und schließen.
  • +
  • Strg+T teilt die Ansicht (2 bis 6 Bereiche), Alt+I tippt in alle sichtbaren gleichzeitig.
  • +
  • ⇧F10 verschiebt einen Tab in ein eigenes Terminalfenster.
  • +
  • Strg+F durchsucht den Verlauf, Strg+E springt zu Fehlerzeilen.
  • +
  • F9 und ⇧F1…⇧F8: Schnellbefehle, passend zum Gerät vorbelegt (Linux, Windows, Aruba, Cisco, Juniper, MikroTik, FortiGate …).
  • +
  • F6 Host-Übersicht: CPU, RAM, Platte, Updates bei Servern; Firmware, Ports und VLANs bei Netzwerkgeräten; c Container.
  • +
  • Reißt die Leitung ab (WLAN, VPN, Ruhezustand), verbindet sshTermy von selbst neu, startet Tunnel und hängt tmux/screen wieder an. Nach dem Aufwachen oder einem Netzwechsel werden alle Leitungen sofort geprüft.
  • +
+
+ +
+

KI-Copilot

+
    +
  • Ghost-Text: grauer Vorschlag beim Tippen, Tab oder → übernimmt.
  • +
  • Folgebefehle: nach jedem Befehl bis zu vier Vorschläge, Alt+1…4 fügt ein (ohne Enter).
  • +
  • Warum? & Fix: schlägt ein Befehl fehl, erklärt Alt+0 die Ursache und schlägt eine Lösung vor.
  • +
  • KI fragen: F3; die Antwort kennt Bildschirm, System und bisherige Befehle.
  • +
  • Ersatz-Anbieter: fällt der erste aus, springt der nächste ein (Einstellungen › KI).
  • +
  • Lernen pro Gerät: korrigierst du einen KI-Befehl, merkt sich sshTermy das für dieses Gerät.
  • +
+
+ +
+

Ziel-, Agent- und Plan-Modus

+

F2 öffnet den Ziel-Modus: du beschreibst ein Ziel („nginx mit TLS einrichten“), die KI schlägt Schritt für Schritt einen Befehl vor, du bestätigst mit ⏎. Tab schaltet auf den Agent-Modus:

+ + + + + + +
StufeWas ohne Rückfrage läuft
Vorsichtignur lesende Befehle
Normalalles außer Gefährlichem, sudo und Inline-Code
Vollalles außer Gefährlichem
Erst planendie KI legt einen Plan vor, du bearbeitest und gibst frei
+

Gefährliche Befehle (z. B. rm -rf, Formatieren, Switch-Neustart) laufen nie automatisch. Erfolgreiche Ziele lassen sich als Runbook speichern und später auf vielen Hosts ausführen.

+
+ +
+

Switches, Router, Firewalls

+

sshTermy erkennt ArubaOS-Switch/ProCurve, ArubaOS-CX, Cisco IOS, Juniper Junos, MikroTik RouterOS, FortiGate, Comware und Huawei. Dort gibt es nie versteckte Exec-Kanäle: alle Abfragen laufen sichtbar am Prompt.

+
    +
  • F6 → r: Firmware, Modell, CPU/RAM, Ports und VLANs.
  • +
  • F6 → b: Konfiguration verschlüsselt sichern (show running-config, Junos show configuration | display set, RouterOS /export, FortiOS show full-configuration); d zeigt den Unterschied zum letzten Stand.
  • +
  • Regeln für Configs: z. B. „ntp server muss gesetzt sein“; Verstöße erscheinen nach jeder Sicherung.
  • +
  • Gerät finden: MAC oder IP eingeben, sshTermy fragt alle Switches nach MAC-, ARP- und LLDP-Tabellen und nennt Switch und Port.
  • +
  • Zeitplan (z): z. B. nächtliche Sicherung aller Switches eines Ordners.
  • +
+
+ +
+

Mehrere Hosts

+
    +
  • Broadcast (m): Befehle oder ein Runbook auf vielen Hosts gleichzeitig; Ergebnisse nebeneinander, Gefahren-Check vorher.
  • +
  • Netzwerk-Scan (f): findet SSH-Hosts in einem Netz und legt sie als Verbindungen an.
  • +
  • Arbeitsbereiche (w): geteilte Ansichten speichern; g öffnet einen Ordner als Raster.
  • +
  • sshTermy ist mit 1000 Verbindungen getestet: Manager, Suche, Palette und Sync bleiben unter einigen Millisekunden pro Bild.
  • +
+
+ +
+

Dateien und Tunnel

+
    +
  • F5: SFTP mit zwei Seiten, kopieren mit c oder Ziehen, e öffnet eine Server-Datei im eigenen Editor und lädt sie beim Speichern hoch.
  • +
  • tsz/trz im Terminal übertragen Dateien auch durch Jump-Hosts (trzsz).
  • +
  • F4: Tunnel (lokal, remote, SOCKS) an- und ausschalten; Web-Dienste öffnen sich im Browser.
  • +
+
+ +
+

Sicherheit

+
    +
  • Store: alle Passwörter, Schlüssel und API-Keys verschlüsselt; ohne Master-Passwort unlesbar.
  • +
  • Gefahren-Check: auf Produktiv-Hosts (oder überall) müssen riskante Befehle zweimal bestätigt werden; auch beim Einfügen.
  • +
  • Sperre: sofort oder nach Leerlauf; Sitzungen laufen dahinter weiter.
  • +
  • Audit-Protokoll (Einstellungen › Sicherheit): wer hat wann auf welchem Host was getan. Jede Zeile ist verkettet und signiert; „Audit-Protokoll prüfen und speichern“ meldet geänderte, gelöschte oder umsortierte Zeilen. Befehle mit führendem Leerzeichen erscheinen nur als „(privat)“.
  • +
  • Updates sind mit Ed25519 signiert; ein Update ohne gültige Signatur wird abgelehnt.
  • +
+
+ +
+

KI-Datenschutz

+

Vor jedem Senden entfernt sshTermy Passwörter, Schlüssel und Tokens. Unter Einstellungen › KI › „KI-Datenschutz“ wählst du:

+
    +
  • alle Anbieter – Standard.
  • +
  • nur lokale KI – nur Endpunkte im eigenen Netz (localhost, private IPs, .local/.lan/.internal); Cloud-Anbieter werden übersprungen.
  • +
  • KI aus – nichts geht hinaus.
  • +
+

Pro Verbindung wirken die Tags ki-lokal und ki-aus, z. B. für Kundennetze; die strengere Einstellung gilt. „Letzte KI-Anfrage ansehen“ zeigt genau, was zuletzt an welchen Host und welches Modell ging.

+
+ +
+

Sync und Team

+
    +
  • Sync (y): Verbindungen, Tunnel, Runbooks und Einstellungen Ende-zu-Ende verschlüsselt über einen Cloud-Ordner (OneDrive, Dropbox, iCloud, Syncthing) oder WebDAV (NAS, Nextcloud).
  • +
  • Team-Paket: einen Ordner verschlüsselt als .sshteam weitergeben; Team-Ordner lassen sich abonnieren und bleiben aktuell.
  • +
  • Teilen: einen Tab live zeigen; Zuschauer sehen mit, schreiben nur, wenn du es erlaubst.
  • +
  • Vermittler: Server hinter NAT/Firewall über einen eigenen Vermittler erreichen.
  • +
+
+ +
+

Sicherung und Umzug

+

Einstellungen › Import / Export › „Gesamtsicherung speichern“ (oder sshtermy backup) packt den ganzen Datenordner in eine mit dem Master-Passwort verschlüsselte .sshtbak-Datei: Verbindungen, Schlüssel, Protokolle, Switch-Sicherungen, known_hosts und Einstellungen.

+

Auf dem neuen Rechner: sshTermy installieren, beim ersten Start ein beliebiges Passwort anlegen, dann „Gesamtsicherung einspielen“ (oder sshtermy restore datei.sshtbak). Nach Rückfrage startet sshTermy neu und arbeitet mit dem alten Master-Passwort. Der bisherige Stand bleibt als ….vorher-<Datum> daneben.

+
+ +
+

MCP für KI-Clients

+

Claude Desktop, Claude Code und andere MCP-Clients können sshTermy als Werkzeug nutzen. Einschalten unter Einstellungen › Sicherheit › „MCP-Zugriff für KI-Clients“:

+
    +
  • nur lesen: Verbindungen und Tabs auflisten, einen Tab lesen, lesende Befehle (df -h, show interfaces) ausführen.
  • +
  • mit Rückfrage: jeder andere Befehl läuft erst nach j in sshTermy.
  • +
+
claude mcp add sshtermy -- sshtermy mcp
+

Claude Desktop: in claude_desktop_config.json den Server {"command": "sshtermy", "args": ["mcp"]} eintragen. sshTermy muss laufen und entsperrt sein. Der KI-Datenschutz gilt auch hier, und jeder Aufruf steht im Audit-Protokoll.

+
+ +
+

Fehler melden

+
    +
  1. Einstellungen › „Debug-Protokoll für Fehlerberichte“ einschalten (oder sshtermy --debug starten).
  2. +
  3. Den Fehler nachstellen.
  4. +
  5. Hilfe › „Debug-Protokoll bereinigt speichern“: eine Kopie ohne Hosts, IPs, Benutzernamen und Passwörter landet in Downloads.
  6. +
  7. Ein Issue auf GitHub öffnen und die Datei anhängen.
  8. +
+

Stürzt sshTermy ab, bietet es beim nächsten Start einen bereinigten Absturzbericht an.

+
+ +
+

FAQ

+
Ich habe das Master-Passwort vergessen.

Ohne Passwort lässt sich der Store nicht entschlüsseln, das ist Absicht. Unter Windows hilft die Windows-Anmeldung (DPAPI), falls eingeschaltet. Sonst den Datenordner umbenennen und neu anfangen; synchronisierte Verbindungen kommen mit dem Sync-Passwort zurück.

+
Windows meldet „Der Computer wurde durch Windows geschützt“.

Die .exe ist noch nicht codesigniert. „Weitere Informationen“ → „Trotzdem ausführen“. Mit winget erscheint die Warnung meist nicht.

+
macOS sagt, die App „kann nicht geöffnet werden“.

Über Homebrew oder den Einzeiler installieren, oder die Quarantäne entfernen: xattr -d com.apple.quarantine sshtermy_darwin_arm64.

+
Wo liegen meine Daten?

Windows %APPDATA%\sshtermy, macOS ~/Library/Application Support/sshtermy, Linux ~/.config/sshtermy. SSHTERMY_HOME verlegt den Ordner, z. B. auf einen USB-Stick.

+
Die Verbindung zu einem Aruba-Switch bricht sofort ab.

Manche Switches beenden die Sitzung bei einem zweiten Kanal. sshTermy erkennt Netzwerkgeräte und öffnet dort nur die Shell. Falls nicht: im Formular unter „Erweitert“ den Gerätetyp auf „Netzwerkgerät“ stellen.

+
Die Funktionstasten tun nichts.

Manche Terminals oder Laptops fangen F-Tasten ab (z. B. Helligkeit). Fn-Taste gedrückt halten oder Tasten unter b im Manager umbelegen. Auf dem uConsole entsprechen Fn+1…= den Tasten F1…F12.

+
Die KI antwortet nicht.

Der Punkt oben rechts zeigt den Zustand. s → Strg+T testet den Endpunkt. Ist der KI-Datenschutz auf „nur lokal“ oder „aus“, oder hat die Verbindung den Tag ki-aus, ist das gewollt.

+
Werden meine Befehle irgendwohin geschickt?

Nur an den KI-Anbieter, den du einrichtest, und nur bereinigt. sshTermy hat keine Telemetrie. Der Update-Check fragt nur GitHub nach der neuesten Version.

+
Kann ich sshTermy ohne KI nutzen?

Ja. Ohne eingerichteten Anbieter (oder mit „KI aus“) ist es ein vollwertiges SSH-Terminal mit Manager, SFTP, Tunneln, Broadcast und Sicherungen.

+
Wie bekomme ich Updates?

sshTermy prüft beim Start und zeigt neue Versionen an; F12 → u installiert. Mit Homebrew, apt oder winget kommen Updates über den Paketmanager.

+
+
+
+ + + + + diff --git a/site/de/index.html b/site/de/index.html index c73ef74..d4d31f4 100644 --- a/site/de/index.html +++ b/site/de/index.html @@ -21,6 +21,7 @@ Tasten Kurzreferenz Updates + Handbuch Fragen GitHub diff --git a/site/index.html b/site/index.html index 1318c2b..a2005fa 100644 --- a/site/index.html +++ b/site/index.html @@ -21,6 +21,7 @@ Keys Quick reference Updates + Manual FAQ GitHub diff --git a/site/manual.html b/site/manual.html new file mode 100644 index 0000000..4e8d328 --- /dev/null +++ b/site/manual.html @@ -0,0 +1,229 @@ + + + + + +sshTermy – Manual and FAQ + + + + + + +
+
+ + +
EN · DE
+
+
+ +
+ + +
+
+

Manual

+

Everything important about sshTermy in one place. For printing there is the quick reference (PDF); every key can also be looked up in the app with F1.

+

Getting started

+
    +
  1. Install – see Install. sshTermy is a single file for Windows, macOS and Linux.
  2. +
  3. Create a master password. On first start you choose a password for the encrypted store (Argon2id + AES-256-GCM). It is never saved. On Windows your Windows sign-in can unlock it as well (DPAPI).
  4. +
  5. Bring your connections: i in the manager imports from ~/.ssh/config, PuTTY, MobaXterm, Ansible inventories or CSV. Or press n for a new connection.
  6. +
  7. Set up AI (optional): s in the manager. Pick a provider (your own server, Ollama, OpenAI, Claude); Ctrl+T tests it.
  8. +
  9. Connect: pick a connection, ⏎. F10 takes you back to the manager while the session keeps running.
  10. +
+

Almost everything is in the command palette Ctrl+Space: type what you are looking for, e.g. “lock”, “audit” or “matrix”.

+
+ +
+

Connections

+

The form (n/e) shows only name, address, user and sign-in at the top; “Advanced” opens jump host, tags, folder, device type, shortcut and more.

+
    +
  • Sign-in: password (encrypted in the store or in the system keychain), key file (PuTTY .ppk too), SSH agent, security key (FIDO), certificates. c in the manager creates a key and copies it to the server.
  • +
  • Folders and tags: o creates folders (“Customer / Site” nests), drag with the mouse to reorder. #tag in the search filters.
  • +
  • Jump host: connect through another server; sshTermy remembers which jump host fits which network.
  • +
  • Telnet, serial, local: “Connection type” picks Telnet, a USB console cable or this computer's shell (Alt+L).
  • +
  • Persistent session: always land in the same tmux/screen session for a connection, even from another computer.
  • +
+
+ +
+

Terminal and tabs

+
    +
  • F7/F8 switch tabs, Alt+T lists them all, Alt+N/Alt+W open and close.
  • +
  • Ctrl+T splits the view (2 to 6 panes), Alt+I types into all visible panes at once.
  • +
  • ⇧F10 moves a tab into its own terminal window.
  • +
  • Ctrl+F searches the scrollback, Ctrl+E jumps to error lines.
  • +
  • F9 and ⇧F1…⇧F8: quick commands, preset for the device (Linux, Windows, Aruba, Cisco, Juniper, MikroTik, FortiGate …).
  • +
  • F6 host overview: CPU, RAM, disk, updates on servers; firmware, ports and VLANs on network devices; c containers.
  • +
  • If the line drops (Wi-Fi, VPN, standby), sshTermy reconnects by itself, restarts tunnels and re-attaches tmux/screen. After waking up or a network change all connections are checked right away.
  • +
+
+ +
+

AI copilot

+
    +
  • Ghost text: a grey suggestion while you type, Tab or → accepts.
  • +
  • Next commands: up to four suggestions after every command, Alt+1…4 inserts (without Enter).
  • +
  • Why? & fix: when a command fails, Alt+0 explains the cause and suggests a fix.
  • +
  • Ask AI: F3; the answer knows the screen, the system and your previous commands.
  • +
  • Fallback providers: if the first one fails, the next takes over (Settings › AI).
  • +
  • Learning per device: correct an AI command and sshTermy remembers it for that device.
  • +
+
+ +
+

Goal, agent and plan mode

+

F2 opens goal mode: describe a goal (“set up nginx with TLS”), the AI proposes one command per step, you confirm with ⏎. Tab switches to agent mode:

+ + + + + + +
LevelWhat runs without asking
Carefulread-only commands only
Normaleverything except dangerous commands, sudo and inline code
Fulleverything except dangerous commands
Plan firstthe AI presents a plan, you edit and approve it
+

Dangerous commands (e.g. rm -rf, formatting, switch reload) never run automatically. Successful goals can be saved as a runbook and later run on many hosts.

+
+ +
+

Switches, routers, firewalls

+

sshTermy recognises ArubaOS-Switch/ProCurve, ArubaOS-CX, Cisco IOS, Juniper Junos, MikroTik RouterOS, FortiGate, Comware and Huawei. On these devices there are never hidden exec channels: every query runs visibly at the prompt.

+
    +
  • F6 → r: firmware, model, CPU/RAM, ports and VLANs.
  • +
  • F6 → b: back up the configuration encrypted (show running-config, Junos show configuration | display set, RouterOS /export, FortiOS show full-configuration); d shows the diff to the previous one.
  • +
  • Config rules: e.g. “ntp server must be set”; violations show up after every backup.
  • +
  • Find a device: enter a MAC or IP, sshTermy asks all switches for their MAC, ARP and LLDP tables and names switch and port.
  • +
  • Schedule (z): e.g. a nightly backup of all switches in a folder.
  • +
+
+ +
+

Many hosts

+
    +
  • Broadcast (m): commands or a runbook on many hosts at once; results side by side, danger check first.
  • +
  • Network scan (f): finds SSH hosts in a network and adds them as connections.
  • +
  • Workspaces (w): save split views; g opens a folder as a grid.
  • +
  • sshTermy is tested with 1000 connections: manager, search, palette and sync stay within a few milliseconds per frame.
  • +
+
+ +
+

Files and tunnels

+
    +
  • F5: two-sided SFTP, copy with c or by dragging, e opens a server file in your own editor and uploads it on save.
  • +
  • tsz/trz in the terminal transfer files even through jump hosts (trzsz).
  • +
  • F4: switch tunnels (local, remote, SOCKS) on and off; web services open in the browser.
  • +
+
+ +
+

Security

+
    +
  • Store: all passwords, keys and API keys encrypted; unreadable without the master password.
  • +
  • Danger check: on production hosts (or everywhere) risky commands need a second confirmation, also when pasted.
  • +
  • Lock: immediately or after idle time; sessions keep running behind it.
  • +
  • Audit log (Settings › Security): who did what on which host and when. Every line is chained and signed; “Verify and save audit log” reports changed, deleted or reordered lines. Commands with a leading space appear only as “(private)”.
  • +
  • Updates are signed with Ed25519; an update without a valid signature is rejected.
  • +
+
+ +
+

AI privacy

+

Before anything is sent, sshTermy removes passwords, keys and tokens. Under Settings › AI › “AI privacy” you choose:

+
    +
  • all providers – the default.
  • +
  • local AI only – only endpoints in your own network (localhost, private IPs, .local/.lan/.internal); cloud providers are skipped.
  • +
  • AI off – nothing leaves the computer.
  • +
+

Per connection the tags ki-lokal and ki-aus apply, e.g. for customer networks; the stricter setting wins. “Show last AI request” shows exactly what was last sent to which host and model.

+
+ +
+

Sync and team

+
    +
  • Sync (y): connections, tunnels, runbooks and settings end-to-end encrypted through a cloud folder (OneDrive, Dropbox, iCloud, Syncthing) or WebDAV (NAS, Nextcloud).
  • +
  • Team package: share a folder encrypted as .sshteam; team folders can be subscribed to and stay current.
  • +
  • Share: show a tab live; viewers watch along and type only if you allow it.
  • +
  • Relay: reach servers behind NAT/firewalls through your own relay.
  • +
+
+ +
+

Backup and moving to a new computer

+

Settings › Import / export › “Save full backup” (or sshtermy backup) packs the whole data folder into a .sshtbak file encrypted with the master password: connections, keys, logs, switch backups, known_hosts and settings.

+

On the new computer: install sshTermy, create any password on first start, then “Restore full backup” (or sshtermy restore file.sshtbak). After confirming, sshTermy restarts and uses the old master password. The previous state stays next to it as ….vorher-<date>.

+
+ +
+

MCP for AI clients

+

Claude Desktop, Claude Code and other MCP clients can use sshTermy as a tool. Switch it on under Settings › Security › “MCP access for AI clients”:

+
    +
  • read only: list connections and tabs, read a tab, run read-only commands (df -h, show interfaces).
  • +
  • with confirmation: any other command runs only after y in sshTermy.
  • +
+
claude mcp add sshtermy -- sshtermy mcp
+

Claude Desktop: add the server {"command": "sshtermy", "args": ["mcp"]} to claude_desktop_config.json. sshTermy must be running and unlocked. AI privacy applies here too, and every call is in the audit log.

+
+ +
+

Reporting bugs

+
    +
  1. Turn on Settings › “Debug log for bug reports” (or start sshtermy --debug).
  2. +
  3. Reproduce the problem.
  4. +
  5. Help › “Save cleaned debug log”: a copy without hosts, IPs, user names and passwords lands in Downloads.
  6. +
  7. Open an issue on GitHub and attach the file.
  8. +
+

If sshTermy crashes, it offers a cleaned crash report on the next start.

+
+ +
+

FAQ

+
I forgot my master password.

Without the password the store cannot be decrypted; that is on purpose. On Windows the Windows sign-in (DPAPI) helps if it is switched on. Otherwise rename the data folder and start over; synced connections come back with the sync password.

+
Windows says “Windows protected your PC”.

The .exe is not code-signed yet. “More info” → “Run anyway”. With winget the warning usually does not appear.

+
macOS says the app “cannot be opened”.

Install through Homebrew or the one-liner, or remove the quarantine flag: xattr -d com.apple.quarantine sshtermy_darwin_arm64.

+
Where is my data?

Windows %APPDATA%\sshtermy, macOS ~/Library/Application Support/sshtermy, Linux ~/.config/sshtermy. SSHTERMY_HOME moves the folder, e.g. to a USB stick.

+
The connection to an Aruba switch drops immediately.

Some switches end the session when a second channel opens. sshTermy recognises network devices and opens only the shell there. If it does not: set the device type to “Network device” under “Advanced” in the form.

+
The function keys do nothing.

Some terminals or laptops grab F keys (e.g. for brightness). Hold the Fn key or remap keys under b in the manager. On the uConsole, Fn+1…= are F1…F12.

+
The AI does not answer.

The dot at the top right shows the status. s → Ctrl+T tests the endpoint. If AI privacy is set to “local AI only” or “AI off”, or the connection has the tag ki-aus, that is intended.

+
Are my commands sent anywhere?

Only to the AI provider you set up, and only cleaned. sshTermy has no telemetry. The update check only asks GitHub for the latest version.

+
Can I use sshTermy without AI?

Yes. Without a provider (or with “AI off”) it is a complete SSH terminal with manager, SFTP, tunnels, broadcast and backups.

+
How do I get updates?

sshTermy checks on start and shows new versions; F12 → u installs. With Homebrew, apt or winget updates come through the package manager.

+
+
+
+ + + + + diff --git a/site/style.css b/site/style.css index 7f90eba..f6525e7 100644 --- a/site/style.css +++ b/site/style.css @@ -76,3 +76,14 @@ details p, details ul { color: var(--dim); } .shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; } footer { border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; } footer .bar { height: auto; padding: 22px 20px; flex-wrap: wrap; } + +/* Handbuch: Inhaltsverzeichnis links, Text rechts */ +.manual { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; } +.manual .toc { position: sticky; top: 72px; padding-top: 40px; font-size: 14.5px; } +.manual .toc a { display: block; color: var(--dim); padding: 3px 0; } +.manual .toc a:hover { color: var(--fg); text-decoration: none; } +.manual article section { padding-top: 40px; } +.manual article p, .manual article li { color: #b8c0cc; } +.manual article h3 { color: var(--fg); } +.tip { border-left: 3px solid var(--violet); background: var(--panel); padding: 8px 14px; border-radius: 0 8px 8px 0; color: var(--dim); } +@media (max-width: 860px) { .manual { grid-template-columns: minmax(0, 1fr); } .manual .toc { position: static; padding-top: 20px; columns: 2; } }