Repository navigation
Description
Problem
SSH tunnels have broken for TablePro users several times: an agent offering every key until the server answered "Too many authentication failures" (#2601), 1Password asking for a passphrase (#2583), a relay spinning at 100% CPU after the socket dropped (#1769), a lost jump host (#790), and agent auth failing (#729, #322). Each was fixed. No test runs a tunnel against a real server to keep it fixed, and a new OpenSSH release can break a tunnel without any test noticing.
What each app has today:
- macOS and iOS each run their own tunnel on the bundled libssh2 1.11.1 (
apple/TablePro/Core/SSH,apple/TableProMobile/TableProMobile/SSH). Their tests use socket pairs and fakes (apple/TableProTests/Core/SSH/TestSupport/SocketPair.swift). No test opens a tunnel to a runningsshd. The only real server is the SFTP probe (apple/scripts/sftp-test-server.sh), run by hand on the unpinnedlatestimage. - That libssh2 build offers no ML-KEM or sntrup761 key exchange, so a server that allows only post-quantum key exchange cannot be reached.
- With no
IdentityFileset, the macOS tunnel tries onlyid_ed25519,id_rsaandid_ecdsa(apple/TablePro/Core/SSH/LibSSH2TunnelFactory.swift:824). No code or test covers FIDO keys ([email protected]). - Linux runs the system
sshand tests it against an OpenSSH 10.3 container (linux/crates/test-fixtures/src/fixture_image.rs:78,linux/crates/ssh/tests/openssh_session.rs): password, keyboard-interactive, host certificates and jump hosts, with ed25519 keys only (linux/crates/test-fixtures/src/ssh_key_pair.rs). The connection tests setIdentityAgent none; theSshAgentfixture (linux/crates/test-fixtures/src/ssh_agent.rs) is never used by a connection test.
Proposed solution
A scripted matrix on pinned Docker images that opens a tunnel and runs one query through it:
- Servers: OpenSSH 9.x and 10.x.
- Client keys: ed25519, RSA (
rsa-sha2-256andrsa-sha2-512) and ECDSA P-256, each with and without a passphrase. FIDO keys through an agent, or a clear error where the app cannot use them. - Auth: password, keyboard-interactive with a TOTP code, and an agent holding more keys than the server's
MaxAuthTries(the SSH Agent auth offers all agent keys, hits "Too many authentication failures" with 1Password #2601 case). - A two-hop jump host chain.
- Key exchange: the server default, and a server limited to
mlkem768x25519-sha256andsntrup761x25519-sha512. The tunnel either connects or shows an error that names the key exchange. - Connection loss: stop
sshdmid-session. The tunnel reports closed and the relay goes idle (High CPU (100% of a core) — SSH tunnel relay busy-spins after the tunnel socket drops (no POLLHUP/POLLERR handling) #1769).
Run it for the macOS tunnel and the iOS tunnel, and add the missing cases (RSA, ECDSA, a real agent, a 9.x server, post-quantum only) to the Linux Docker suite.
Done when the matrix runs in one command, and every cell passes or ends with a named error on each app.
Alternatives considered
Testing by hand against a personal server, which covers one server version and one key at a time.
Platform
All
Related database type
N/A / General
Activity