Using your SSH Keys in Brokkr
Using your SSH keys
Issue: I cant access my server when entering my SSH key?
When you first create an account in Brokkr you can add your public SSH key, to be injected into the server’s OS when you deploy it. When you provision a server, it will inject these SSHs and be available, however, after provisioning, any SSH keys added into Brokkr will not be injected into existing deployed server. If you want to inject these keys using Brokkr, you can simply reprovision the server and the new keys will be added. If reprovisioning is not an option, or desired, then you will need to add new SSH keys via the CLI after you have accessed the server with your keys.
To add SSH keys to a bare metal server via the CLI, follow these steps:
- Generate a new SSH key pair on your local machine using the command:
ssh-keygen -t rsa -b 2048
- When prompted, provide a name for the key pair and press Enter. You can also press Enter to accept the default file location.
- Enter a passphrase for the key pair when prompted. This is optional, but it adds an additional level of security.
- The system will then generate a new SSH key pair.
- You should now be able to SSH into the server without a password.
Other Notes
- Check your ssh-agent
ssh-add -L
- make sure your private key is there
ssh-add ~/.ssh/nameofprivatekey
- In addition to the RSA key format, Brokkr is also compatible with other key formats such as ed25519. The process for generating, adding, and using these keys is similar to the process described above for RSA keys.
- When the server provisions in Brokkr, you will see the green dot next to the server name stop blinking and stay solid green. However, you need to wait an additional 5 min as the server does its final reboot before you are able to SSH into the server, so the total time from when you start the server provisioning to when you can enter it is about 20-25 min.