In this article, I will teach you. Best way to generate SSH keys on Windows 10. If you want to connect remotely from a computer, one of the best and most secure ways is to use a Secure Shell (SSH) connection. This creates an encrypted connection between you and the remote host, ensuring that the sent data cannot be captured or monitored in any way.
You can use SSH as a tunnel for other traffic, too, as a secure VNC connection with SSH. One way to make your SSH connections more secure is to use SSH keys, which replace easy-to-crack passwords with a 617-digit encryption key.
Here is the complete guide to generate SSH Keys on Windows 10, and Linux PC
What are SSH keys?
SSH Keys enable you to build secure connections to remote servers or PCs without using a password using the Secure Shell Protocol. SSH keys are made in pairs, with the private key and the public key always connected-one cannot be used without the other.
In most cases, the public key stays in the remote PC or server to encrypt the connection. A private key is then used to authenticate that device remotely, allowing you to connect and use it without giving a password.
The public and private SSH keys are two parts of the same thing-without a private key, you can’t authenticate with the public key and establish a connection, and without a public key, a private key is useless. You can generate SSH keys on Windows, Mac, and Linux, and send the public key to a remote device.
The private key is securely stored on your PC or Mac. It is important to back up a copy of this key securely (for example, using a password manager). If you lose it, you may not be able to re-establish your remote connection.
It is also important not to share your public or private key, but especially your private key (or the passphrase that may decrypt it). With the private key you have, a powerful user will be able to establish a connection to your remote device without the need for additional authentication.
How to Use Windows 10 to Generate SSH Keys
Windows 10 to generate SSH keys using the built-in OpenSSH client or a popular, third-party PuTTY client. If you would like to use a graphical interface (GUI) to create new SSH keys, PuTTY is the best option. If you choose to use the built-in software, then use OpenSSH (via Windows PowerShell) instead.
1. Using OpenSSH With Windows 10 PowerShell
Step 1. If you want to use OpenSSH, you will need to first check that it is enabled. To do this, you can right-click on the start menu and select Settings.
Step 2. In the Settings menu, select App> App and features> Optional feature.
Step 3. See the OpenSSH client Optional feature menu. If not, select Add a feature.
Step 4. You can select the OpenSSH Client option, then select Install to install it. Allow several minutes for Windows to install the required software. If you need to use SSH to connect to your Windows PC, make sure to select the OpenSSH Server option, too.
Step 5. With OpenSSH installation, right-click on the start menu and select Windows PowerShell (Admin).
Also, you can open the new Windows PowerShell window, then type the ssh-keygen and select the enter key. You can type a new archive with your key filename at this point, or just press enter a second to save your files in the C:\Users\user.ssh\ folder (replacing user with your user directory).
The ssh-keygen tool will use RSA encryption automatically, but you can switch to another encryption by typing the ssh-keygen -t method instead, which means one of the available encryption options (dsa, ecdsa, ed25519, rsa).
Step 7. Next, you will need to enter an entry passphrase. This encrypts your private key on your PC and is commendable, Although it’s not required. You can use a memorable word or phrase, but you can also use a secure password here instead. Type your entry passphrase and select enter to confirm or simply leave it blank and select enter to leave it blank.
Step 8. Once you have added your passphrase, Windows will generate the required keys in the C:\Users\user.ssh\ folder (replacing user with your user folder name). If you choose to use a default filename, the id_rsa.pub file is your private key, while id_rsa (without no extension) is your private key. Once you have generated your keys, you will need to move your public key (id_rsa.pub) to the .ssh directory on your remote PC, Mac, and server.
2. Using PuTTY
The well-popular PuTTY SSH client is the default client for most Windows users. Many other tools for establishing SSH connections, including PuTTYgen, a tool for generating new SSH keys.
Step 1. To use PuTTY to make your SSH keys, download PuTTY for your PC and install it. Once installed, launch PuTTYgen (SSH generated tool) in the start menu, select RSA in the key type to generate options, and then select Generate. You can also select one of the other encryption options, but the steps below may vary.
Step 2. Part of the process of producing your keys is to move your mouse randomly. Use your mouse or fingerprint to do this in the area below the progress bar until the keys is generated.
Step 3. If you want to add a passphrase to your key, type this in the key passphrase and confirm the passphrase boxes, then select Save public key and private key to save your key. You can also select the text on the Public Key to paste it into the authorized OpenSSH_ key box, then right-click and select Copy to copy and paste the file manually.
Step 4. Once your key is saved, you can move the public key to your remote PC, Mac, or server. As your private key, you may need to move this to your C:\Users\user.ssh\ folder (replacing user with your correct user directory) to use it with your preferred SSH client.
How to Generate SSH Keys on Linux or macOS
OpenSSH is the standard gold set of tools for SSH management and, as the Windows version, the ssh-keygen tool is always the best way to generate SSH keys on Mac or Linux computers.
As a result, GUI tools for generating SSH keys are rare and not typically recommended. Since OpenSSH tools are Included on all Mac computers and with almost every Linux distribution, the steps below should apply to both platforms.
Step 1. To get started, open a new terminal window on your Linux PC or Mac. If you want to use your Mac to generate SSH keys, you can launch the Terminal app using Launchpad. The steps to open a new terminal on Linux PC will vary, depending on your distribution.
Step 2. In the new terminal window on your Linux PC or Mac, type the ssh-keygen and select the enter key. As with ssh-keygen on Windows, Linux and Mac versions are the default for RSA encryption. If you would like to use another encryption method, type the ssh-keygen -t method, and enter another method with the encryption form you wish to use (eg. dsa, ecdsa, ed25519, rsa).
Step 3. Next, you will need to decide where you would like to save the new SSH keys-the default file name and location to be displayed in circular brackets in the terminal window. If you want to keep your keys elsewhere and have a different file name, type a new location and file name here, and then select the enter key.
Step 4. Next, you’ll need to type in a passphrase to encrypt your secret key (if you’d like to use it). Type your passphrase double, or select to enter twice to leave the entry passphrase blank (although this is not recommended).
Step 5. At this point, your SSH keys will be generated in the same location you specified and using the default id_rsa file encryption for RSA encryption (id_rsa.pub for the public key and id_rsa for the private key). You will need to move your public key (id_rsa.pub) to your remote PC, Mac, or server to be ready to establish your connection using SSH.
Making Secure Connections Using SSH
Once you have generated your SSH keys, you will need to make sure you copy the public key to your remote PC, Mac, or server. This connects to your private key, allowing your preferred SSH client to establish a secure SSH connection without a standard password. For example, you can use SSH to connect to another Mac remotely.
A secure SSH connection can also help you get around a school or work firewall using the SSH tunnel. You can also use SSH to connect (and update) Raspberry Pi or other Linux-based PCs and servers. You will need to make sure you enable the OpenSSH server if you want to do this on Windows 10, however.
If you have any questions or queries about this article, please comment below, and we’ll get back to you. Check more daily updates to get subscribe to our Website and also you can get informational articles and much more etc.