## Creating a SSH Key Pair SSH key pairs are used for secure, passwordless login to instances. Public keys are injected into instances at creation time, allowing administrators or users to authenticate using the corresponding private key. ### Generating a Key Pair Locally Use the `ssh-keygen` command in your terminal to create a new SSH key pair: ```bash ssh-keygen -t ed25519 -C "[email protected]" ``` 1. **Filename**: Press Enter to accept the default file location (usually `~/.ssh/id_ed25519`). 2. **Passphrase**: Enter a secure passphrase (recommended) or press Enter for no passphrase. This creates two files: - `id_ed25519` (Private Key): **Keep this secret.** Never share it. - `id_ed25519.pub` (Public Key): This is the key you will upload to Atlas. ### Importing Your Public Key to Atlas 1. In the Atlas Console, navigate to **Compute > SSH Key Pairs**. 2. Click **Create SSH Key Pair**. 3. Copy the contents of your public key file: ```bash cat ~/.ssh/id_ed25519.pub ``` 4. Paste the output into the **Public Key** field in the console. 5. Give it a recognizable name (e.g., "laptop-key") and save. ![[Pasted image 20251002000929.png]] ### Letting Atlas Generate a Key Pair Alternatively, you can let Atlas generate a key pair for you: 1. Click **Create SSH Key Pair**. 2. Leave the **Public Key** field blank. 3. Click **Create**. 4. **Important**: Your browser will download the private key file automatically. **Save this file immediately.** Atlas does not store the private key, and it cannot be recovered if lost. Once created, you can select this key pair when launching new instances.