Commit graph

4 commits

Author SHA1 Message Date
vrubelroman
c328fff867 feat(ssh): add refcounted connection Pool and Lease (2B.4)
Panels, jobs and previews hold Leases; only the pool closes a
connection, after IdleClose without leases or on Close, so concurrent
use and release cannot race (N-P0-8) and a mirror keeps its connection
when the other panel leaves (N-P1-12). Concurrent Acquires of one
user@host:port share a single dial (N-P2-8); Reconnect retries with
backoff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:51:51 +03:00
vrubelroman
351970078f feat(ssh): add Conn with keepalive, states, reconnect and exec (2B.3)
Keepalive with a per-reply timeout marks a frozen link Lost and closes
it so hung SFTP calls fail with ErrConnLost (N-P1-2). Reconnect installs
a new generation in the same Conn. Exec takes a ctx (SIGKILL + close on
cancel) and an output limit (N-P2-15, N-P1-7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 23:37:01 +03:00
vrubelroman
94002e286f feat(ssh): add conn dialer with bounded handshake, host keys and auth chain (2B.2)
The whole handshake (TCP, kex, auth, SFTP init) runs under a deadline
that ctx cancellation cuts short, and a late client is closed (N-P1-3).
HostKeyAlgorithms come from known_hosts (N-P1-4); unknown and changed
keys go to a Prompter (N-P2-14). Auth tries identity files, then agent
keys over one shared agent connection, then default keys, password and
keyboard-interactive through the Prompter (N-P2-1, N-P2-2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 23:33:26 +03:00
vrubelroman
8584a638f1 feat(ssh): add sshconfig resolver and host store (2B.1)
Resolve host aliases through ~/.ssh/config with kevinburke/ssh_config:
HostName defaults to the alias, key=value syntax, Host * defaults,
Include, quotes, several IdentityFile, '#' inside values (N-P1-5).
Endpoint.Key includes the user (N-P2-3). Port the hosts.dat store with
atomic writes and a base64 password field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 23:27:58 +03:00