Skip to content

Connect with an SSH key through an agent

KryoDesk can sign SSH logins with keys held by an SSH agent, so the private key never has to be read by KryoDesk. This guide sets that up and checks it.

macOS ssh-agent (started by launchd, socket in SSH_AUTH_SOCK):

Terminal window
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
ssh-add -l # lists the loaded keys with their SHA-256 fingerprints

For a FIDO security key ([email protected]) the agent must be built with FIDO support. If the macOS agent refuses to sign with the key, use an agent from Homebrew’s OpenSSH (brew install openssh) and enter its socket in step 2:

Terminal window
eval "$(/opt/homebrew/bin/ssh-agent -a ~/.ssh/agent.sock)"
/opt/homebrew/bin/ssh-add ~/.ssh/id_ed25519_sk

Agent socket in step 2 is then ~/.ssh/agent.sock.

Open Settings → Connections → SSH Agent:

  1. Use the system SSH agent (SSH_AUTH_SOCK) must be on (the default).
  2. Agent socket:

Leave empty for the macOS agent. For another agent enter its socket, for example ~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock (1Password) or ~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh (Secretive).

KryoDesk started from the Dock gets launchd’s SSH_AUTH_SOCK, not one exported in your shell profile. An agent started in ~/.zshrc is reached only through Agent socket.

  1. Apply or OK.

In the session dialog of the server:

  • Specify username: the remote login.
  • Advanced SSH settings → Authentication: Auto (agent, keys, then password).
  • Use private key: off, unless you want a key file as fallback.

Double-click the session. The tab shows Connecting to host:22..., the host key check on the first connection (answer yes after comparing the fingerprint), then the shell. No passphrase prompt appears, because the agent signs.

With a security key the tab prints Touch the security key: <algorithm> <fingerprint> once the server has accepted the key; touch it (and enter its PIN if the agent asks).

What the tab shows Cause and fix
A password prompt The server accepted none of the agent’s keys. Check ssh-add -l and the server’s ~/.ssh/authorized_keys.
SSH agent <path> (Settings → Connections → SSH Agent): … Agent socket cannot be opened. Check the path and that the agent runs.
The server closed the connection during authentication (too many failed attempts? …) The agent offered more keys than MaxAuthTries allows. Remove keys from the agent, or set Authentication to Private key only with the key file.
The agent refused to sign with … (SSH_AGENT_FAILURE) Security key not touched in time, wrong PIN, key not plugged in, or an agent without FIDO support.
… is a FIDO security key …: the file holds only a handle A security key file was set as Use private key or in Built-in Agent Keys. Load it into an agent instead (step 1).

KryoDesk has its own agent for key files. In Settings → Connections → SSH Agent → Built-in Agent Keys use Add Key… to add ~/.ssh/id_ed25519. With Auto authentication every session tries these keys after the system agent. An encrypted key asks for its passphrase once per app run (and offers to save it in the vault); the decrypted key stays in memory until Unload Keys, the app lock or quitting KryoDesk. After a lock the next connection decrypts the key again (passphrase from the vault or typed in the tab); connections already open keep running.

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close