Skip to content

Test SSH tunnels against real OpenSSH servers across keys, agents and key exchange #3662

Closed

Description

@datlechin

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 running sshd. The only real server is the SFTP probe (apple/scripts/sftp-test-server.sh), run by hand on the unpinned latest image.
  • 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 IdentityFile set, the macOS tunnel tries only id_ed25519, id_rsa and id_ecdsa (apple/TablePro/Core/SSH/LibSSH2TunnelFactory.swift:824). No code or test covers FIDO keys ([email protected]).
  • Linux runs the system ssh and 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 set IdentityAgent none; the SshAgent fixture (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:

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

  1. added
    enhancement
    platform-macos
    platform-ios
    platform-linux
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplatform-iosplatform-linuxplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions