ssh-mock

command
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Minimal SSH server mock for the e2e harness — just enough for the app's SSH "Test Connection" (a TCP dial + SSH handshake, no command) to pass against a hermetic in-harness server. Pure stdlib + golang.org/x/crypto/ssh (already a project dep); started as a Playwright `webServer` (see playwright.config.ts) and dialed by the real app at 127.0.0.1:<port>. The SSH analog of fixtures/redis-mock.mjs.

Why no auth / no host key dance is needed:

  • NoClientAuth: true — x/crypto/ssh probes the "none" method first, which the server accepts, so whatever credential the form sends is irrelevant (the app's empty-password Test Connection still completes).
  • the app's TestConnection binding uses AutoTrustFirstRejectChangeVerifyFunc, so the random host key generated here is auto-trusted on first connect (no UI prompt) against the fresh e2e DB.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL