Skip to content

macOS Keychain integration

On a Mac, ZestSSH keeps its secrets in your login keychain. It does this through FlutterSecureStorage, which uses the macOS Keychain Services API. Your hosts, keys’ public parts, snippets and settings are in the app’s encrypted database; the keychain holds the secrets, including the key that opens that database.

  • Each secret is a generic password item (kSecClassGenericPassword).
  • Its service is flutter_secure_storage_service, and its account is the name in the table below.
  • ZestSSH uses the login keychain (the file-based keychain), not the data protection keychain. The app declares no keychain access group entitlement, which the data protection keychain needs.
  • Items are not synchronizable, so they never go to iCloud Keychain. To have your hosts and keys on other devices, use sync.

On a computer each account’s items, and guest data’s, begin with p.<id>., where <id> is a random id for that profile: p.<id>.zestssh_db_encryption_key, say. The names below are what comes after it. The app lock’s own items keep their names, but for the slots, which are vault2_slots.

Data Item name (account)
The key of the app’s encrypted database zestssh_db_encryption_key
With Encrypt data at rest on: that key wrapped behind your PIN, and the unlock slots vault_wrapped_db_key, vault_slots
A key’s password, private key, passphrase and certificate identity_password_{id}, identity_key_{id}, identity_passphrase_{id}, identity_cert_{id}
A certificate authority’s private key ca_key_{id}
The key of your personal sync sync_dek
Your account’s keys (used for teams) account_keys_v1_...
A team’s database key one item per team
Sync storage settings sync_backend_config
Automation API keys: only each key’s SHA-256 hash and its last 4 characters, never the key automation_api_keys
The key that encrypts session transcripts zestssh_transcript_encryption_key
This device’s sign-in registration device_session_v1
App lock: method, auto-lock time, idle lock security_lock_method, security_auto_lock_timeout, security_idle_lock_minutes
App lock: PIN hash (only while Encrypt data at rest is off) security_pin_hash
App lock: failed PIN tries and lockout time pin_failed_attempts, pin_lockout_until
The password for automatic backups auto_backup_password

A team’s keys keep their secrets in the team’s own encrypted database, not in the keychain.

Turn it on in Settings > Security and privacy > Data-at-rest protection > Encrypt data at rest (it needs an app PIN first). Then:

  • The database key is kept wrapped behind your PIN, so the database opens only after you unlock.
  • The secrets of your keys (passwords, private keys, passphrases, certificates, a CA’s key), the sync key, your account’s keys, each team’s database key and this device’s signing key for your teams are sealed with AES-256-GCM under a key kept inside the database. So are the password of automatic backups, the key of session transcripts, the passwords of WebDAV places backups are copied to, the Google Drive sign-in, a team’s event export settings, and the monitoring server’s sign-in (its client certificate and password, token, password and header value). Something that can read your keychain cannot use them without your PIN.
  • No hash of your PIN is kept: the PIN is checked against the wrapped key itself. A hash kept by an earlier version is deleted at the next unlock.

On a Mac there is no Hardware-backed encryption option; that setting is on Windows (TPM) only. ZestSSH also tells you to turn on FileVault for full-disk encryption.

The macOS app is not sandboxed: it has no com.apple.security.app-sandbox entitlement. That lets it read your existing ~/.ssh files, run a local shell, reach SSH agents, and find Mosh and Eternal Terminal where Homebrew or MacPorts installed them. It also avoids the keychain errors (errSecMissingEntitlement) the sandbox caused.

The app declares no com.apple.security.keychain-access-groups entitlement. Without the sandbox, the keychain uses the app’s bundle identifier, com.affluentlabs.zestssh, for its items.

The release build declares com.apple.security.network.client and com.apple.security.network.server. These come from when the app was sandboxed; without the sandbox they do not limit anything. Debug and profile builds also declare com.apple.security.cs.allow-jit, for Flutter’s debug mode; release builds do not.

Without the sandbox, the app declares no file access entitlements and needs none. Importing keys, SSH config files and backups, and exporting transcripts and backups, work with any folder you pick.

A key can use an SSH agent instead of a private key stored in ZestSSH. On a Mac, ZestSSH looks for:

  • The system agent: the socket in SSH_AUTH_SOCK.
  • 1Password: ~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock.
  • Bitwarden: ~/Library/Containers/com.bitwarden.desktop/Data/.bitwarden-ssh-agent.sock (the App Store app) or ~/.bitwarden-ssh-agent.sock (the app from Bitwarden’s website).

See SSH agent.

Moving the app to the Trash does not remove its keychain items. To remove everything ZestSSH keeps on this Mac first, use Delete all local data:

  1. Open Settings > Backups and data.
  2. In Danger zone, find Delete all local data: it “Removes every connection, key, password and snippet on this device, and signs you out. Your synced data stays where it is. Cannot be undone.”
  3. Confirm. Every ZestSSH item in the keychain is deleted with the rest.

Or delete the items by hand in Keychain Access: search for flutter_secure_storage_service.

Each macOS user account has its own login keychain, so each user’s ZestSSH secrets are separate.

  • Items are not synchronizable, so they stay on this Mac.
  • With Encrypt data at rest on, the secrets in the keychain are sealed, and are of no use without your PIN.