SSH keys and identities

Generate or import SSH keys, use passphrases, and link keys and passwords to hosts through identities.

The Keychain page holds two kinds of item:

  • Identities: a username plus how to log in (a password, an SSH key, or both).
  • SSH keys: private keys, stored encrypted in the vault and never shown in the app.

Hosts point at an identity, so changing a password or key in one identity updates every host that uses it.

Generate a key

  1. Open Keychain and click Generate key.
  2. Choose the Vault and a Key type. Ed25519 is recommended and works with any OpenSSH from the last decade. ECDSA (P-256, P-384, P-521) is for systems that need NIST curves. RSA (4096, 3072, 2048) is for old servers and network gear that only accept RSA; 4096 takes a few seconds to generate.
  3. Give it a Label.
  4. Optionally set a Passphrase (optional). This encrypts the key file itself, for when you copy it elsewhere. Duo22 keeps the passphrase with the key, so connecting stays automatic.
  5. Click Generate.
  6. Click Copy public key and add it to ~/.ssh/authorized_keys on each server.

Import an existing key

  1. Click Import key.
  2. Paste the Private key, or click Load from file…. OpenSSH (-----BEGIN OPENSSH PRIVATE KEY-----) and PuTTY (.ppk) formats work.
  3. If the key is encrypted, enter its Passphrase. Duo22 keeps it with the key.
  4. Click Import. The key is encrypted into the vault and syncs to your other devices.

Keys with a passphrase show a passphrase badge in the list. To copy a key’s public half later, use the copy button (Copy public key) in its row.

Create an identity

  1. Click New identity.
  2. Enter a Label and the Username you log in as on the server.
  3. Add a Password, choose an SSH key, or both.
  4. Click Save, then pick the identity in each host’s Identity field.

Saved passwords are stored encrypted and never shown again. When editing, leave the password empty to keep the current one, or tick Remove saved password to be asked each time.

How Duo22 signs in over SSH

When you connect, Duo22 tries, in order:

  1. A certificate from a certificate authority in the vault, if one signs for this identity (see SSH certificate authorities).
  2. Your SSH key.
  3. The saved password.
  4. Keyboard-interactive sign-in, for things like one-time codes.
  5. Finally, if the server accepts passwords, it asks you for the password (up to three tries).

Shared vaults

A host can only use identities and keys from its own vault. This keeps your personal credentials from becoming usable through a vault you share with others. If you need a key or identity in another vault, use Move or copy to vault… from its menu.

Deleting

Deleting a key removes the private key from the vault on every device. Deleting an identity means the hosts using it need a new identity.

If a host signs in on one device but not another, see Troubleshoot connections.

Still stuck? Check the FAQ, or browse thehelp centre.