macOS menu-bar app · for HPC / SLURM clusters

Log into your cluster once. Stay connected.

SSH2FA keeps a warm connection to your 2FA-gated hosts and answers the Duo / TOTP login for you — so your own ssh connects instantly, with no code to retype and zero ssh-config editing.

v1.0.0 · free & open source · universal (Apple Silicon + Intel) · macOS 26 · MIT
zsh — ~
~ $ ✓ connected — reused a warm ControlMaster no password prompt · no 2FA code [gpu-04 ~]$   ↑ you typed your Duo code hours ago. it's still you.
How it works

Type your 2FA once. Then just ssh.

A small background helper handles the tedious part, so your terminal stays exactly the way you like it.

1

Import your hosts

SSH2FA reads your ~/.ssh/config — enable hosts in one click, or add one and scan its 2FA QR. Credentials live in the macOS Keychain.

2

It stays warm

The daemon keeps a connection alive per host and auto-recovers it after sleep, network changes, and reboots.

3

Connect instantly

Run ssh <alias> in your own terminal — it reuses the warm connection. SSH2FA sets that up for you; you edit nothing.

Features

Far more than auto-login.

A real macOS app for the connection you live in — see it set up, stay warm, and run your cluster.

MENU BAR

Every host, warm and one click away.

SSH2FA lives in your menu bar and holds a live connection to each host. Green means warm — open a terminal, mount it in Finder, or forward a port straight from the row. No window to go hunting for.

  • At-a-glance status for every host you've enabled
  • Open Terminal, mount, or tunnel from the row itself
  • Auto-recovers after sleep, Wi-Fi changes, and reboots
SSH2FA● 4 warm
gpu-04
login0128 ms
compute19 ms
archivereconnecting…
+ Add host⌘K
SLURM

Know exactly how long your job has left.

Forward a port straight to your job's compute node, then watch a live countdown pulled from squeue. SSH2FA warns you before the allocation ends — and tears the tunnel down cleanly when it does.

  • A node picker finds the compute node for a running job
  • Live TIME_LEFT countdown, straight from the scheduler
  • Heads-up before expiry — no silently dead tunnels
Jupyter tunnelforwarding
localhost:8888→gpu-04:8888
Allocation ends in2:57:43
job 4127 · auto-closes when the job ends
COMMAND PALETTE

Drive the whole thing from ⌘K.

Hit ⌘K and start typing. Connect, open a terminal, mount a host, start a tunnel, or jump to settings — all without leaving the keyboard. Prefer the shell? There's a full CLI and TUI too.

  • Fuzzy-search every host and action
  • Connect, mount, or tunnel in two keystrokes
  • The same power from ssh2fa in your shell
⌘Kconnect gpu
→Connect to gpu-04↵
›Open Terminal · gpu-04
›Mount gpu-04 in Finder
›Forward a port to a job…
TOUCH ID

Your fingerprint, back in the loop.

Because SSH2FA holds your credentials so it can log in for you, you can require Touch ID before anything sensitive happens — revealing a secret, editing a host, or exporting a setup. The convenience stays; the gate comes back.

  • Biometric prompt before credentials are revealed
  • Falls back to your Mac's password automatically
  • Entirely optional — off by default, on when you want it
SSH2FA
wants to reveal the saved credentials for gpu-04
Use Password…
2FA SETUP

Add a host's 2FA in one scan.

Enrolling a new host? Screenshot the Duo / TOTP QR to your clipboard (⌘⇧⌃4) and SSH2FA reads the secret straight into the Keychain — no long Base32 string to copy by hand, and no typos to lock you out.

  • Screenshot the QR to the clipboard, then "Scan QR from clipboard"
  • Parses the otpauth:// secret automatically
  • Stored in the Keychain, never in plain text
Add 2FA secret
Secret captured
otpauth://totp/gpu-04?secret=••••••••
Everything else, included

No-retype 2FA

Auto-submits your password + a fresh TOTP at login.

Zero-config terminal

Your own ssh reuses the warm master — no edits.

ssh config import

Reads ~/.ssh/config to enable your hosts in one click.

Mount in Finder

Browse a host's files over sshfs, right in Finder.

Update notifications

Know the moment a new release ships.

iCloud sync

Your settings follow you across all your Macs.

Export & import

Move your tunnel and host setups between Macs.

Health checks

A Troubleshoot panel diagnoses connection issues.

CLI & TUI

Manage every host and tunnel from the terminal.

Drift warnings

Alerts if a host quietly leaves your ssh config.

Safe by default

Test-login before saving — never lock yourself out.

Native macOS 26

Liquid Glass UI, universal binary, zero telemetry.

Security, stated plainly

SSH2FA stores your SSH password and TOTP secret in the macOS Keychain and submits the second factor for you. That convenience means your "second factor" no longer protects you against someone with access to your unlocked Mac — so you can turn on an optional Touch ID lock to require your fingerprint before any credential is revealed. Read the full security model before you rely on it.

Goal · $99 / year — the Apple Developer fee

Help get SSH2FA notarized.

SSH2FA is free and open source. With an Apple Developer membership ($99/year) the app can be notarized — installing with zero Gatekeeper warnings for everyone. If it saves you the daily 2FA dance, chip in toward the $99.

Buy me a coffee
Get started

Install SSH2FA.

Requires macOS 26 (Tahoe) or later. Pick a method below — it's not notarized yet (the $99 goal), so each one clears macOS's one-time "unverified developer" warning for you.

Open Terminal (press ⌘ Space, type Terminal, hit Enter), click Copy on whichever applies, paste, and press Enter. SSH2FA downloads, installs, and opens itself — no warnings, nothing else to click. No Homebrew? Use the second command — it needs nothing extra.

# Have Homebrew? (then `brew reinstall --cask ssh2fa` to update later) brew install --cask gasvn/tap/ssh2fa \ && xattr -dr com.apple.quarantine /Applications/SSH2FA.app \ && open /Applications/SSH2FA.app
# No Homebrew needed (admin account; auto-cleans its temp mount) d="$(mktemp -d)" \ && curl -fL --retry 3 --retry-all-errors https://github.com/gasvn/ssh2fa/releases/latest/download/SSH2FA.dmg -o "$d/SSH2FA.dmg" \ && hdiutil attach "$d/SSH2FA.dmg" -nobrowse -quiet -mountpoint "$d/mnt" \ && ditto "$d/mnt/SSH2FA.app" /Applications/SSH2FA.app \ && xattr -dr com.apple.quarantine /Applications/SSH2FA.app \ && open /Applications/SSH2FA.app; \ hdiutil detach "$d/mnt" -quiet 2>/dev/null; rm -rf "$d"
  1. Download SSH2FA.dmg — it saves to your Downloads folder.
  2. Double-click the downloaded SSH2FA.dmg. In the window that opens, drag the SSH2FA icon onto the Applications folder shown next to it.
  3. Open your Applications folder and double-click SSH2FA. macOS shows “Apple could not verify…” — click Done (don't move it to Trash).
  4. Open System Settings → Privacy & Security, scroll to the bottom. You'll see “SSH2FA was blocked…” — click Open Anyway, type your Mac password, then click Open.
  5. That's it — SSH2FA is running. Look for its icon in your menu bar (top-right of the screen).

Nothing in the menu bar after a few seconds? The bundled helper can stay quarantined on this path — run xattr -dr com.apple.quarantine /Applications/SSH2FA.app once in Terminal, then reopen SSH2FA.

Once it's open, click the SSH2FA menu-bar icon → Add Host to connect your first cluster.

Prefer to build it yourself? git clone https://github.com/gasvn/ssh2fa && cd ssh2fa/auto2fa-mac && ./package-app.sh