Credentials
Click the credentials (key) icon in the title bar and the left sidebar switches to the list of credentials. A credential is a set of login details that several hosts can share: a name, a username and a way to log in:
| Type | What it keeps | When logging in |
|---|---|---|
| Password | Username and password | Uses the password saved in the credential; asks if none is saved or it’s rejected |
| Key | Username, private key and passphrase | Uses only this private key; the passphrase is saved per key file and shared by credentials that use the same file |
| SSH Agent | Username | Uses only the keys in the SSH agent: on macOS / Linux the agent that SSH_AUTH_SOCK points to, on Windows the OpenSSH Authentication Agent service |
Creating a credential
Section titled “Creating a credential”- Creating and editing: “+” at the top of the list, “New credential…” in the empty list, or the context menu on empty space opens the dialog; to edit a credential, double-click it, select it and press Enter, or right-click it and choose “Edit credential…”. Passwords and private key passphrases go into the system keychain; the database holds only the name, username, type and private key path.
Private keys
Section titled “Private keys”- Where the key comes from: a key credential’s “Private key” has three sources.
- Local file: choose a private key file, and ShellRS keeps a copy of it in
keys/in the data folder; the original is read this once and never changed. If you change the original later (a new key, say) and can no longer connect, choose it here again. Credentials made before this version keep using the file they name. - Paste: paste a private key in OpenSSH, PEM or PuTTY format. If you paste a public key or something unrecognizable, ShellRS says why. The passphrase field appears only when the private key is encrypted with one.
- Generate: choose Ed25519 (the default) or RSA 4096, and the key is generated as soon as you choose. The dialog shows the public key, with a button to copy it. The passphrase can be left empty; if you enter one, it encrypts the private key and goes into the keychain. A generated key has the credential’s name as its comment.
- ShellRS keeps the private keys from all three sources as files in
keys/in the data folder (with random file names, readable only by your account), and the credential refers to that file; when you edit the credential, it shows as “Local file” with that path. Pasting or generating again overwrites the file directly, and connected hosts don’t reconnect because of it; switching to another file or another type, or deleting the credential, deletes the file together with its passphrase, and the dialog warns you first. ShellRS never changes or deletes your own private key files. When the whole data folder moves (a portable copy on a new drive letter, or data copied in from elsewhere), credentials switch to the same file in its new place by themselves; the keychain knows a passphrase by the key’s path, so a key with a passphrase asks for it once more. - The empty list and the context menu on empty space also have “Generate key…”, which opens the same dialog with “Key · Generate” already chosen. A key credential’s context menu has “Copy public key”, for adding the public key to
~/.ssh/authorized_keyson a server.
- Local file: choose a private key file, and ShellRS keeps a copy of it in
Editing and deleting
Section titled “Editing and deleting”- Hosts follow the credential: changing a credential’s username changes it for every host that uses the credential and has no username of its own; hosts with another username keep theirs. Open tabs stay as they are, and tabs opened afterwards use the new settings; the dialog says how many hosts use it.
- Deleting: right-click and choose “Delete”. If hosts use the credential, the confirmation says how many and how they’ll log in afterwards: hosts using a password credential switch to “Password” and ask when connecting; hosts using a key or SSH Agent credential switch to “No password”. Usernames stay the same (a host with a username of its own keeps it); passwords and private keys aren’t copied over. Open connections aren’t affected, and the credential’s password is deleted from the keychain along with it.
SSH Agent credentials
Section titled “SSH Agent credentials”- An SSH Agent credential says why right away when it can’t reach the agent, the agent has no keys, or the server accepts none of them; it never falls back to asking for a password. Hosts set to “No password” try the same agent too, skip it silently if it can’t be reached, and go on to the default private keys (on Windows as well).
Not implemented yet: creating a credential right from the host dialog, ordering credentials, a custom SSH agent socket, installing the public key on a host automatically, and exporting the private keys ShellRS keeps.