--- title: "How to add your public SSH key to Allspice" slug: "how-to-add-your-public-ssh-key-to-allspice" description: "Further your knowledge in adding your public SSH key to Allspice by reading here." updated: 2026-10-23T18:42:46Z published: 2026-10-23T18:42:46Z canonical: "learn.allspice.io/how-to-add-your-public-ssh-key-to-allspice" --- > ## Documentation Index > Fetch the complete documentation index at: https://learn.allspice.io/llms.txt > Use this file to discover all available pages before exploring further. # How to add your public SSH key to Allspice SSH authentication lets you connect to Allspice Hub without entering your username and password each time. Instead of passwords, SSH uses a pair of cryptographic keys: a **private key** that stays on your machine, and a **public key** that you upload to Allspice Hub. This guide walks you through the full process from key generation to verification. --- ## Prerequisites - An Allspice Hub account at [hub.Allspice.io](https://hub.allspice.io) - Git for Windows installed (includes Git Bash) — or any terminal on macOS/Linux - OpenSSH installed (included with Git for Windows and macOS by default. --- ## Step 1: Generate an SSH Key Pair **Already have a key?** Check for `~/.ssh/id_ed25519` and `~/.ssh/id_ed25519.pub`. If both exist, skip to Step 2. 1a. Open a Terminal On Windows, open **Git Bash** (right-click any folder and select "Git Bash Here"). On macOS or Linux, open your **Terminal**. 1b. Run the Key Generation Command Replace the email address with the one associated with your Allspice Hub account: ```shell ssh-keygen -t ed25519 -C "your_email@example.com" ``` > **Why Ed25519?** It's faster and more secure than the older RSA format, and is the recommended key type for Allspice Hub. When prompted for a file location, press **Enter** to accept the default: ```shell Enter a file in which to save the key (/home/you/.ssh/id_ed25519): [Press Enter] ``` You'll then be asked to set a passphrase. A passphrase protects your private key if your machine is ever compromised. You can leave it empty, but **a passphrase is recommended**: ```shell Enter passphrase (empty for no passphrase): [type your passphrase] Enter same passphrase again: [confirm passphrase] ``` ### c. Confirm the Keys Were Created Two files will now exist in your `~/.ssh/` folder: - `id_ed25519` — your **private key**. Never share this file with anyone. - `id_ed25519.pub` — your **public key**. This is what you upload to Allspice Hub. Verify they exist: ```shell ls ~/.ssh ``` ## Step 2: Copy Your Public Key Copy the contents of your public key to your clipboard. **On Windows (Git Bash):** ```shell cat ~/.ssh/id_ed25519.pub | clip ``` **On Linux:** ```shell cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard ``` Alternatively, open `~/.ssh/id_ed25519.pub` in any text editor and copy the entire contents manually. ## ## Step 3: Add the Key to Allspice Hub - Log into your [hub.Allspice.io](http://hub.allspice.io/) account and navigate to [https://hub.Allspice.io//settings/keys](https://hub.allspice.io/user/settings/keys) - Click on Manage SSH Keys → Add Key. - In the dialog: - Give your key a recognizable **Name** (e.g., "Work Laptop" or "Home Desktop"). - Paste your public key into the **Content** field. - Click **Add Key**. You should now see your key listed along with its SHA256 fingerprint. ![A prompt to enter your key's name with a box labeled content underneath. At the bottom there is an add key button in green outlined in red.](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/setting-up-openssh-authentication-with-git-image-3nzw4583.png) ## Step 4: Verify Your Key Allspice Hub requires you to prove you own the corresponding private key. This is done by signing a one-time token. - On the SSH Keys settings page, click **Verify** next to your newly added key. - The site will generate a unique token and a command to run. Copy the command, it will look like this (your token will be different): ![Verification dialog generated token is shown in the token prompt, with a red remove button in the top right, along with a veriy button and cancel button at the bottom.](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/setting-up-openssh-authentication-with-git-image-7je1edf4.png) ```shell echo -n "94ca2b130aaaa9fe1ca34e2327c5b048c4c1a4608201cc860581b4c62bc670a5" | ssh-keygen -Y sign -n gitea -f ~/.ssh/id_ed25519.pub ``` If your key is saved in a different location, replace `~/.ssh/id_ed25519.pub` with the actual path to your public key file. - Run the command in your terminal. If you set a passphrase, you'll be prompted to enter it now. - The output will be a signature block like this — copy the **entire block** including the header and footer lines: ```shell -----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgdn8sdB2U3ZhiC6ZA2BqpHfv1Nv ... -----END SSH SIGNATURE----- ``` - Paste the signature into the **"Armored SSH signature"** field in the verification dialog and click **Verify**. A successful verification will show a confirmed status next to your key. --- ## Troubleshooting **Verification fails** Remove the key from Allspice Hub, delete `~/.ssh/id_ed25519` and `~/.ssh/id_ed25519.pub` from your machine, and start over from Step 1. Take care when copying your public key — no extra spaces or line breaks. **Permission denied (publickey) when cloning/pushing** Make sure you're using the SSH clone URL (starting with `git@hub.allspice.io:`) and not the HTTPS URL. **"Could not open a connection to your authentication agent"** Start the SSH agent and add your key: ```shell eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 ``` **Forgot your passphrase** There is no way to recover a lost passphrase. Delete the key pair and generate a new one from Step 1. --- Still need help? Reach out at [support@Allspice.io](mailto:support@allspice.io) ##