How to generate a secure SSH key pair?
Jim Zandueta
Posted on August 16, 2022
Required Reading:
- None
Optional Reading:
- None
-
Generate an SSH key pair
- Open your favorite terminal
- Run the ssh-keygen command
$ ssh-keygen -t rsa -b 4096 -C "tonystark@avengers.com"
INFO: For increased security, the type flag
-t rsa
and the bitsflag -b 4096
are required. The comment flag-C "tonystark@avengers.com"
allows us to easily identify who owns the SSH key.
- Specify the key file name. Default is
id_rsa
- Enter a passphrase *optional
WARNING: If you already have a default SSH key ~/.ssh/id_rsa, DO NOT OVERWRITE IT. If you are not careful, you will lose SSH access to your cloud servers and git platforms. Instead, give your new SSH key a new name, such as id_rsa_avengers.
-
Resources
💖 💪 🙅 🚩
Jim Zandueta
Posted on August 16, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.