--- title: "Add an SSH key" description: "Add a public SSH key to your TIR account by pasting it or uploading its file, so you can choose it when you create an instance or a training cluster." content_type: "how-to" product: "ssh-keys" platform: "TIR" url: "/tir/ssh-keys/how-to/add-an-ssh-key/" topic: ["ssh-keys"] relationships: {"requires":["/tir/ssh-keys/how-to/generate-an-ssh-key-pair-on-your-computer/"]} --- # Add an SSH key Add a public SSH key to TIR once, and then pick it whenever you create an instance or a training cluster. Your keys belong to you, so one key is available in every project. ## Before you begin You need a public key. If you need one, [generate a key pair on your computer](/tir/ssh-keys/how-to/generate-an-ssh-key-pair-on-your-computer/) or [create one in the browser](/tir/ssh-keys/how-to/create-an-ssh-key-in-the-browser/). ## Add the key 1. In TIR, open the account menu at the top right and select **SSH Keys**. 2. Open the **Add Key** menu and select **Add new key**. The **Add SSH Key** form opens. 3. In **Key name**, type a name that tells you which computer the key is for, such as `macbook-pro-2025` or `office-workstation`. A name can be up to 50 characters, and it must differ from the names of your other keys. 4. In **Public key**, paste the contents of your public key file, which `cat ~/.ssh/id_ed25519.pub` prints. Paste one key only. 5. Select **Add Key** at the bottom of the form. It is available once both fields are filled. **Cancel** takes you back to the list. The key is now in your list. ### Upload the key file instead Instead of pasting, you can select **Upload .pub file** and choose your public key file. If the key ends with a one-word comment, that comment becomes the **Key name**. Both fields stay editable after an upload, so you can change the name or the key. If the file has no comment, or a comment of more than one word, **Key name** keeps what you typed before, so type a name if it is empty. **Add Key** is available once both fields are filled. ## What a valid key looks like A public key starts with `ssh-ed25519` or `ssh-rsa`, then the key itself, then an optional comment. TIR also accepts ECDSA keys. Paste the public key only; the private key stays on your computer. TIR refuses a key when: - the key name is already one of yours ("Label already exists."), - the key is already in your list ("SSHKey already exists."), - you pasted more than one key ("Please add one SSH key at a time."), or - the text is not a valid public key. For what to do about each message, see [Troubleshooting SSH Key Management](/tir/ssh-keys/troubleshooting/ssh-keys/). With the key in your list, you can [choose it and connect](/tir/ssh-keys/how-to/connect-with-an-ssh-key/).