Key management
ZestSSH makes, imports, stores and exports SSH keys. Private keys are kept in your system’s secure storage, never in the app’s database or in a plain file. In the app, a saved key is a username plus the SSH key (or the password) it signs in with, and a host picks one in its Key field. The page that lists them is Keys: in the side rail on a computer, under More on a phone.
The Keys page on a computer
Section titled “The Keys page on a computer”The list has four groups: SSH keys, Saved passwords, SSH agent (the keys your system’s ssh-agent holds) and Certificates. Each row shows the key’s Name, Fingerprint, Used by (how many hosts sign in with it), Last used and Added. Type in Filter keys and passwords to narrow the list, or pick All, Unused or In agent (and Unattended or Duplicates when some keys are).
Select a key to open its details beside the list:
- Copy public key, Export…, and Add to agent when this computer has an SSH agent. A saved password has Move to a password manager instead.
- Details: its name, username and public key.
- Used by: the hosts that sign in with it. Click one to go to it.
- Protection: where its secret is kept (for example “Encrypted in your vault”), its Passphrase, whether the SSH agent holds it (Loaded or Not loaded), its Sync, and whether Unattended runs may use it.
- At the bottom, Replace on all n hosts… (Replace on its host… for one host) and Install on hosts….
- Edit opens the key’s form. More actions has Replace key, Duplicate and Delete.
Delete asks first. Where hosts sign in with the key, the question names them: “This key is used by 3 hosts.” with their names under it (up to five, then “and 3 more hosts”). On a computer’s Keys page the question says the key is “removed from every host that uses it”.
Your first key
Section titled “Your first key”With nothing saved, the Keys page says Add your first key and shows the ways to start, each opening what New key opens:
- Generate a new key (Ed25519, marked Recommended). See Generating keys.
- Import a key file: the new key’s editor, open at Import. See Importing existing keys.
- Use the keys in your SSH agent (on a computer).
- From a password manager (on a computer).
- New saved password, for a host that signs in with a password.
What is an SSH key? opens What is an SSH key?. A phone shows Generate a new key, Import a key file and New saved password as a list.
Drop a key file on the Keys page
Section titled “Drop a key file on the Keys page”On a computer, drag a private key file from your file manager onto the Keys page. The page lights up (“Drop a key file to add it”); drop it, and the key opens in the new key’s editor beside the list, named after its file. It is read as Import reads a file, the same formats and the same passphrase question. This works whether or not keys are saved already.
- Drop the private key and its
.pubtogether, and the private key is taken. - A public key alone is refused: “That is a public key, which cannot sign in on its own. Drop its private key: usually the file of the same name without .pub.”
- More than one private key at once is refused: “Drop one key file at a time.”
- In a team’s vault where you may not add keys, the page takes no drop.
Select at the top of the list, or Ctrl+click (Cmd+click on a Mac), selects several keys to move, copy or delete at once. On a phone, long-press a key in Manage > Keys. See Selecting many items.
Generating keys
Section titled “Generating keys”On a computer
Section titled “On a computer”- Open Keys and click New key.
- Choose Generate SSH key (Ed25519), Generate SSH key (ECDSA) or Generate SSH key (RSA-4096).
- In Generate SSH key, set:
- Key name: what the key is called in the app.
- Key type: Ed25519, RSA or ECDSA, and for RSA or ECDSA the Key strength.
- Comment: put at the end of the public key line. Left empty, it is
zestssh-generated.
- Click Generate key pair.
The result shows the key’s fingerprint and its public key, with Copy public key and Share public key. Nothing is kept yet: click Save & use this key to open the key form with the new key, then save it there. If you leave without saving, ZestSSH asks whether to save the key, discard it, or go back.
On a phone
Section titled “On a phone”- Open Manage > Keys (on a tablet, More > Keys) and tap +.
- Fill in Display name and Username, and choose SSH key.
- Tap Generate new key, pick the Key format (and Key strength for RSA or ECDSA), then Generate key.
- Tap Save key.
Supported key types
Section titled “Supported key types”| Key type | Algorithm | Recommended | Notes |
|---|---|---|---|
| Ed25519 | Ed25519 | Yes | Fast, small keys, strong security |
| RSA 2048 | RSA (2048-bit) | No | For older servers only |
| RSA 4096 | RSA (4096-bit) | Acceptable | Slower to make, widely accepted |
| ECDSA P-256 | ECDSA secp256r1 | No | NIST curve; prefer Ed25519 |
| ECDSA P-384 | ECDSA secp384r1 | No | NIST curve; prefer Ed25519 |
| ECDSA P-521 | ECDSA secp521r1 | No | NIST curve; prefer Ed25519 |
Use Ed25519 unless you have a reason not to. It is quick to make and has the shortest public key line. RSA 4096 is the choice for a server that does not take Ed25519.
A key made in the app has no passphrase of its own: it is protected by your system’s secure storage, and by the app lock if you turn it on (see Security basics). You can add one later: see Add, change or remove a passphrase.
Putting the public key on a server
Section titled “Putting the public key on a server”Install on hosts. If you can already sign in to the hosts (for example with a password), let ZestSSH add the key for you:
- Computer: in Keys, select the key and click Install on hosts… at the bottom of its details.
- Phone: open the key in Manage > Keys and tap the server icon (Install on hosts…).
Tick the hosts. ZestSSH adds the public key to the authorized keys of the account each host signs in with, as ssh-copy-id does, and says for each host whether it was added, was already there, or was not added and why. It works on hosts that run Linux, BSD or macOS. See Install a key on hosts.
By hand. Copy the public key line (see Exporting keys) and add it on the server:
# On the remote servermkdir -p ~/.sshecho "ssh-ed25519 AAAA...your-key... zestssh-generated" >> ~/.ssh/authorized_keyschmod 700 ~/.sshchmod 600 ~/.ssh/authorized_keysImporting existing keys
Section titled “Importing existing keys”- Computer: in Keys, click New key, then Import or paste key. Click Set up SSH key and use the Paste or Import tab.
- Phone: in Manage > Keys, tap +, choose SSH key, then Paste key or Import from file.
Supported formats
Section titled “Supported formats”- OpenSSH and PEM: files that begin with
-----BEGIN OPENSSH PRIVATE KEY-----or-----BEGIN RSA PRIVATE KEY-----and the like, asssh-keygenwrites them. - PuTTY .ppk (version 2 and 3): recognized by its
PuTTY-User-Key-File-header and converted to OpenSSH format.ssh-rsaandssh-ed25519keys are supported, with or without a passphrase. See Importing from other apps.
Passphrase-protected keys
Section titled “Passphrase-protected keys”ZestSSH recognizes an encrypted key by:
- The
Proc-Type: 4,ENCRYPTEDheader or anENCRYPTEDmarker (older PEM files). - A modern OpenSSH key that cannot be read without a passphrase.
- A PuTTY key whose header says it is encrypted.
For an encrypted key, ZestSSH asks for the passphrase (Key passphrase). A wrong one says “Incorrect passphrase. Please try again.”; after three wrong tries the import stops with “Failed to decrypt key after 3 attempts.”
The key is kept as you imported it, still encrypted, and the passphrase is saved with it in secure storage, so you are not asked again when you connect. A passphrase saved with a key that no longer has one (taken off on another device, for example) is not used: the key opens without it, as OpenSSH does.
After import
Section titled “After import”The key shows its type (for example ssh-ed25519) and its SHA-256 fingerprint, written as ssh-keygen -l writes it. You can then pick it in a host’s Key field.
Key storage
Section titled “Key storage”Private keys, passwords and passphrases are kept in your system’s secure storage:
- Android: the Android Keystore.
- iPhone and iPad: the iOS Keychain.
- macOS: the macOS Keychain.
- Windows: encrypted for your Windows account with the system’s data protection (DPAPI).
- Linux: the Secret Service (libsecret).
The database holds only what describes a key: its name, type, fingerprint and public key line. With Encrypt data at rest turned on (Settings > Security and privacy), the secrets in secure storage are also sealed under a key that only opens after your PIN.
A key’s saved passphrase and its certificate go with it to your other devices through end-to-end encrypted sync, and into encrypted .zest backups.
Exporting keys
Section titled “Exporting keys”Public key line.
- Computer: in Keys, select the key and click Copy public key. The public key line is copied. (In the key’s form, Export public key does the same.)
- Phone: long-press the key in Manage > Keys, then tap Key actions and Share public key (the line is copied), or open the key, tap the loaded key, and use the copy icon on Public key.
Key files. On a computer, select the key and click Export…; on a phone, long-press the key in Manage > Keys, then tap Key actions and Export…. In Export key:
- Under Files, pick Private and public key, Private key only or Public key only.
- Under Passphrase of the private key file, pick As the key is kept, A new passphrase (typed twice, under New passphrase and Type it again) or No passphrase. If the key has a passphrase that is not saved with it, ZestSSH asks for the Current passphrase.
- Choose Export. ZestSSH writes OpenSSH key files (the private key, and the same name with
.pub). On a computer, the system’s save dialog asks where (Save the key file), and the.pubis saved beside it; on a phone, the share sheet opens so you can choose where to send them.
The dialog warns that the private key file signs in as you, and, with No passphrase, that anyone who gets the file can sign in with the key. A key of a team’s vault can be exported only where the team’s rules let its keys leave the vault.
On a phone, the key’s own page also has the download icon (Export private key, confirmed with Export), which writes the key as a PEM file with its .pub beside it, and, in the loaded key’s SSH key dialog, the copy icon on Private key (the clipboard is cleared 45 seconds later). A private key exported this way has no passphrase: anyone with the file can sign in as you.
To move keys between your devices, use sync or an encrypted .zest backup instead of key files.
Add, change or remove a passphrase
Section titled “Add, change or remove a passphrase”A key can have a passphrase added, changed or taken off. On a computer, select the key: under Protection, Passphrase says Set, None or Not checked yet, with Add one, Change and Remove, or Check (which reads the key to find out). On a phone, long-press the key in Manage > Keys and tap Passphrase: the dialog adds one to a key that has none and changes one that has one.
- If the key’s passphrase is not saved with it, type the Current passphrase.
- Type the New passphrase and Type it again (not needed to remove one).
- Leave Keep it with the key on to connect without being asked, as now, or turn it off to be asked each time the key is needed.
- Choose Add passphrase, Change passphrase or Remove passphrase.
The private key is written again as an OpenSSH key file, sealed the way ssh-keygen -p seals it, and sync takes the new file to your other devices. Removing the passphrase keeps the key with none: anyone who gets the key file can use it.
Add a key to the SSH agent
Section titled “Add a key to the SSH agent”On a computer, Add to agent gives a key of your vault to this computer’s SSH agent, so that ssh, git and other tools can sign in with it while the agent holds it. Under Keep it, pick For an hour, For 8 hours or Until I sign out (on Windows, Until I remove it: Windows’ agent keeps a key until it is removed, also after a restart, and ssh-add -d removes it). If the key has a passphrase that is not saved with it, type it: it is not saved. Choose Add to agent.
If no agent can be reached, ZestSSH says “No SSH agent could be reached on this computer. Start one (on Windows, the OpenSSH Authentication Agent service), then try again.” Phones have no system agent, so the button is not there. A team’s key is added only where the team’s rules let its keys leave the vault. See SSH agent.
Passphrases when you connect
Section titled “Passphrases when you connect”A key whose passphrase is saved signs in without asking. If none is saved, or the saved one is wrong, ZestSSH asks for it when you connect (SSH key passphrase); tick Remember passphrase to save it.
Replace a key on all its hosts
Section titled “Replace a key on all its hosts”Replace on all n hosts… swaps a key for a new one on every host that signs in with it. On a computer it is at the bottom of the key’s details; on a phone, long-press the key in Manage > Keys, then tap Key actions.
In Replace key on its hosts, What happens lists the steps. Pick the New key type (the old key’s own type, Ed25519, ECDSA P-256 or RSA 4096), look over the Hosts (one that will be skipped is marked Skipped, with why, before you start), and choose Replace on n hosts. For each host, on its own:
- ZestSSH signs in with the old key and reads
authorized_keys. - It adds the new key to
authorized_keys. - It makes a new connection with the new key alone, which proves the new key works.
- Only then does it take the old key’s line out of
authorized_keys. Every other line stays as it was. - It sets the host’s saved login to the new key.
A host where a step fails keeps the old key working, and the others go on. Each host shows how far it got, and why it was skipped or failed: for example a host reached through a jump host (add the key with Install on hosts…, then change the host’s key), a team’s host (its keys are replaced by the team’s owners), an old key line with options such as from= or command= (change it by hand), or an authorized_keys that is a link. Stop stops before the next host; Run again on n hosts finishes the hosts that are left, with the same new key.
When it is done, choose what happens to The old key: keep it, named with “(replaced)” (it no longer signs in to these hosts), or Delete it from the vault (on this device and, with sync, on your other devices). If something else still signs in with it, it can only be kept. Then choose Finish.
Replace key (in More actions, or Rotate in the key’s form) is different: it puts new key material into the saved key, so every host that uses it signs in with the new key once you save. Make sure your servers already take the new key before you save.