Schipper.Io.Ssh is a from-scratch SSH-2 server and client. ECDH P-256, [email protected], one session channel. No terminal library. You adapt SshSession to whatever you render.
No port forwarding. Client sessions have no pty. SshHostKey is public so you can reuse it as identity.
Listen with a handler, or SshClient.ConnectAsync with a host-key verifier. Subsystems replace the shell when you say so.
The receive window is credited when the application reads. CHANNEL_EOF is read EOF. A dead transport throws, not a clean zero.
PublicKeyAuth null accepts anything. When set, publickey is verified; none and password still succeed so the app can log in.
The server disposes the session after the handler returns. Half-close with CompleteWritesAsync.
SshHostKey hostKey = SshHostKey.LoadOrCreate("host.key"); var server = new SshServer( new IPEndPoint(IPAddress.Any, 2222), HandleShellAsync, hostKey); await server.RunAsync(cancellationToken); static async Task HandleShellAsync(SshSession session, ...) { int n = await session.ReadAsync(buffer, ct); if (n == 0) return; await session.WriteAsync(buffer.AsMemory(0, n), ct); }