Skip to main content

SSH Key Generation ๐Ÿ”

SSH key pairs are essential for anyone in IT, especially when working with servers or pushing code to SCM systems like GitLab and GitHub. Consider your SSH key as a secure ID cardโ€”protect it well. Follow these steps to generate your SSH key.

โ€‹

Generating an SSH Key ๐Ÿ› ๏ธTo create your SSH key pair, run the following commands: Copy
cd ~/.ssh
Copy
ssh-keygen -t rsa -b 4096
Copy
cat id_rsa.pub

โ€‹

Important Notes:
  • During generation, you may be prompted to set a passphrase. While optional, adding a passphrase increases security, so consider using one you can remember.
  • Never share your private key (id_rsa file) with anyone.
  • The .pub file (e.g., id_rsa.pub) is your public key and can be shared for authentication. The other file (e.g., id_rsa) is your private key and must remain secure.

โ€‹

Loading SSH Keys ๐Ÿ—๏ธTo verify if your SSH key is loaded, use the following command: Copy
ssh-add -l
If no keys are listed, load your SSH key manually: Copy
ssh-add ~/.ssh/id_rsa
Youโ€™ll be prompted to enter your passphrase if you set one. Runningssh-add -lagain should then show your loaded SSH key.
Following these steps ensures secure access to servers and SCM systems, safeguarding Wavezโ€™s code and infrastructure. If you encounter any issues or have questions about SSH key management, feel free to reach out.