Skip to content

SSH keys ​

An SSH key lets an identity reach private repositories without typing a password. It comes in two files: a private key, which stays on your PC and must never be shared, and a public key, which you give to your Git provider. Each identity in DhivaLabs Shell uses only its own key.

Create a new key ​

  1. Open the identity's settings: Add Git identity for a new one, or select it and choose Identity settings.

  2. Select Create SSH key. The app makes a new Ed25519 key and fills in SSH private key (optional) with its location.

  3. Save the identity.

The key is created on your PC with the bundled ssh-keygen and stored in the app's own data folder. The SSH key dialog shows its exact location. If you filled in a commit email first, it is used as the key's label.

WARNING

Keys created by the app have no passphrase. Anyone who can read the private key file can use it. Protect it with your Windows account password and device encryption, and never copy it to other people or services.

Use an existing key ​

Next to SSH private key (optional), select Browse… and choose your existing private key file (the one without .pub). The app expects the matching .pub file next to it.

A key protected with a passphrase works too: Bash asks for the passphrase in the terminal when the key is used.

The app does not import keys from your user folder or a running SSH agent by itself. Only the key you choose is used.

Add the public key to your provider ​

  1. Select the identity in the sidebar, then SSH key in the toolbar. The Connect SSH dialog opens.

  2. Select Copy public key.

  3. On GitHub, open Settings, then SSH and GPG keys, then New SSH key. Paste the key, keep the type as Authentication Key, and save. On other providers, add it to your account's SSH keys.

  4. Back in the app, select Test connection in terminal.

A terminal opens and runs ssh -T against the identity's server. On GitHub, a working key answers with a greeting that names your account. Check that it is the account you expect: if it names another account, the key was added to the wrong one. Other providers answer with their own messages.

DANGER

Only ever share the public key. Never upload, paste or attach the private key file, not to GitHub and not to a support request.

The first connection to a server ​

For GitHub, the app already knows GitHub's published server key, so there is nothing to confirm.

For any other server, SSH shows the server's fingerprint on the first connection and asks whether to continue. Compare the fingerprint with the one your provider or server administrator publishes before you type yes. Never accept a fingerprint you have not checked.

Clone a private repository ​

  1. Select the identity in the sidebar.

  2. Select Clone repo.

  3. In SSH clone URL, paste the SSH address from your provider, such as git@github.com:owner/repository.git.

  4. Choose the destination with Browse… next to Clone into folder, and select Clone & open terminal.

Both git@host:path and ssh://git@host/path addresses work, including nested GitLab groups and Azure DevOps paths. The address must point at the identity's server; otherwise the app asks you to choose an identity connected to that server. For GitHub you can also paste the web address. Custom SSH user names and non-standard ports are not supported in the dialogs.

Inside an identity's terminal you can also run git clone git@github.com:owner/repository.git yourself: GitHub addresses use the identity's key automatically.

Manage a connected key ​

The Connect SSH dialog also shows Private key location (never share this file), with these controls:

ControlWhat it does
Copy pathCopies the private key's location
Open folderOpens the folder that holds the key in File Explorer
Disconnect keyRemoves the key from the identity. Both key files stay on your PC
Delete local key…Permanently deletes the private key and its .pub file, after you confirm with Delete permanently

Close the identity's terminals before you disconnect or delete its key.

Delete local key… works only for keys the app created. Keys you imported, and keys another identity also uses, are protected: disconnect them instead and manage their files yourself.

DANGER

Deleting a key cannot be undone, and it does not remove the public key from your provider. Remove the public key from your GitHub (or other) account as well. Private repositories need a new key afterwards.

What the app changes on your PC ​

Your existing global Git and SSH configuration is not changed. Each identity's SSH settings live in its own home folder inside the app's data, and only its terminals use them.

Next steps ​