Dynamic Devices

Post-quantum cryptography testing · SSH lab

PQC SSH on your Mac

Build separate Mac tools to try SSH with post-quantum key exchange and post-quantum authentication. Apple's SSH stays untouched. This is an experimental OQS-OpenSSH lab, not a production security recommendation.

One script builds the tools, then stops

Download the v9 public Mac source pack · ZIP SHA256

  1. Have Homebrew and Apple's Command Line Tools installed. If needed, run xcode-select --install.
  2. Unpack the ZIP and open Terminal in its folder.
  3. Run the complete build:
sh mac-client.sh

The script installs Homebrew build dependencies, verifies pinned source downloads and builds ssh, ssh-keygen and scp. It checks the SSH algorithms, prints the installed paths and stops. No manual make commands.

~/.local/oqs-ssh-lab/bin/ssh
~/.local/oqs-ssh-lab/bin/ssh-keygen
~/.local/oqs-ssh-lab/bin/scp

No login keys are generated. No server connection or file transfer is attempted. No server is installed. Existing tools and keys are not overwritten. For an older installation, select a fresh prefix as described in the README.

When you're ready to connect

The included README keeps these steps separate from the build:

  1. Create your own ML-DSA login key only if you need one. Keep the private key and passphrase on your computer. Give only the public key to the operator and verify its fingerprint before enrollment.
  2. Obtain the server host key and matching trust-file entry from the operator. Independently confirm its fingerprint. The public ZIP deliberately contains no host key or known_hosts file.
  3. Edit the supplied pqc-lab.sshconfig with your enrolled username, leaving it in the pack. In Terminal, from that folder run . ./use-pqc.sh. This selects the tools/config without changing your normal SSH file or PATH.

The DD public lab is mqtt.dynamicdevices.co.uk:8893. Downloading this pack does not grant access: SSH needs individual enrollment, not the public CheerLights demo password. The server's public key verifies the server; your private login key proves your identity. Direct-key SSH does not need Certbot or a certificate authority.

ssh pqc-lab
scp example.txt pqc-lab:./

Those are the everyday commands after activation: no extra options. Do not use -F /dev/null with the nickname, because it skips your profile. Close the Terminal or run unset -f ssh scp to return to normal. The build still only builds and stops.

Do not paste this profile into your normal SSH config: stock SSH rejects ML-DSA options even in an unrelated Host block. The isolated file handles UseKeychain only for the OQS client, leaving Apple's configuration untouched.

Simple setup and normal commands

What makes this the PQC test?

Standard OpenSSH can offer hybrid key exchange, but that alone does not satisfy this lab's ML-DSA authentication requirement. The explicit lab profile permits no classical-only exchange or authentication fallback. PQC algorithms are not a guarantee against software, endpoint or key-custody flaws.

And scp?

Yes: the build includes scp. Activation selects the OQS SSH executable and the same profile internally. Everyday copies need no -S or port flags. Port 8893 is unchanged; no new port is needed.

Not yet validated end-to-end: modern scp needs the server's SFTP subsystem. Its availability, native compilation of the added scp target and an actual transfer remain unverified. Don't treat the example as a successful test or silently switch to legacy scp or weaker cryptography.

File copying and ordinary-server compatibility

The OQS client can also connect to conventional SSH servers using their normal settings. A successful connection with this client alone does not prove PQC: the negotiated exchange and authentication matter. Strict settings apply to the lab nickname, not every host.

What we actually tested

Recorded on , not rerun by opening this page. The earlier client-only build ran natively on Intel macOS 26.7.3 with Xcode 26.2 and OpenSSL 3.5.10. An ARM64 user build was also reported; the full acceptance suite ran on Intel.

12 recorded live SSH controls passed

  1. Successful PQC key exchange and ML-DSA server/user login.
  2. Wrong ML-DSA user key rejected.
  3. Classical-only key exchange rejected.
  4. Classical-only host signature rejected.
  5. Classical user key rejected.
  6. Incorrect pinned server key rejected.
  7. Root login rejected.
  8. Remote forwarding rejected.
  9. Password-only login rejected.
  10. Real interactive terminal: correct PTY ownership, no effective or ambient user capabilities.
  11. Authentication after a 25-second connected delay.
  12. Disposable test key rejected after revocation; private test keys removed.

V8 checks are narrower: shell syntax, mocked three-tool build/install and existing-prefix protection. No fresh native scp or Homebrew build, and no live SFTP transfer acceptance.

The server's separately approved terminal fix retained a confined master with CHOWN, SETUID, SETGID and SYS_CHROOT, and a 60-second login grace. CHOWN is not PTY-only; other confinement matters. The pack deploys none of this. The Docker SBOM/CBOM does not inventory SSH or its live host. Source pins and lessons are in the README.