× Phaseshift FCOM Tutorials

Creating a new SSH key


Learn how to improve your authentication with SSH keys

SSH keys are pretty important in modern software development as they allow services to authenticate their users with a secure key. In most cases this means you can avoid entering passwords you try to connect to a service as it will attempt to connect via your SSH key instead. To create a new SSH key for your machine, open up a terminal and input the following command:

...and that's it! The prompt will show you the directory where your key was stored so you can find it. 

On Windows, this is usually: 

C:/Users/[YOUR_USER]/.ssh. 

As this is a hidden file by default, you may need to allow File Explorer to show Hidden Files. Within this folder you can use the id_rsa.pub file to authenticate your machine.

On Mac and Linux, by default your ssh key will be stored at:

~/.ssh/id_rsa

It's worth noting...

That there are different encryption methods, rsa is a standard that's been available for a while however Git has started using another method, ed25519. You can specify which standard by using the following and substituting 'rsa' with whichever key type you require:

Keep your private key safe

Remember to keep your SSH keys safe, if someone can get access to your private key, you could be giving them access to all of the systems and services that you have it linked to.

Typically services will only ask for your public SSH key. The public key file is denoted by file type, for example: id_rsa.pub. Your private key is then used to authenticate against the public key.


Liked this article?

Please consider sharing!
Author

Josh Lyell

Game Developer