Главная » Блоги Экспертов И ИТ-Компаний » Use Public Key Authentication with SSH {100% Verified}
PuTTY is a popular Windows terminal emulator, but not limited to the Windows operating systems. Putty Key Generator is a tool that helps to generate public and private SSH keys. 9 месяцев назад
Возможность размещать посты на проекте остановлена

Редакция CNews готова принять пресс-релизы компаний на адрес news@cnews.ru.

Приглашаем вас делиться комментариями о материалах CNews на наших страницах платформ Facebook, Telegram и Twitter.

Use Public Key Authentication with SSH {100% Verified}

Use Public Key Authentication

Public Key Authentication is a secure logging method using SSH. Rather than a password, the procedure uses a cryptographic key pair for validation.

Although using a strong password helps to prevent brute force attacks, public key authentication stores cryptographic strength and automated passwordless logins. Download PuttyKey for generating public and private SSH keys.

This article involves Public Keys and key authentication with ssh. While using ssh, you can use Putty as the best option. So, we can directly dive into the article.

Using SSH Key for Authentication

SSH Key for Authentication

The SSH public key authentication is consists of four steps -

  1. Generate a private and public key, known as the key pair. The private key stays on the local system.
  2. Add the identical public key to the server.
  3. The server stores and marks the public key is recommended.
  4. The server provides access to anyone who proves the control of the corresponding private key.

Adding a passphrase to encrypt the private key combines a layer of security good suitable for most user-based cases. For automation purposes, key management software and systems apply since the private key stays unprotected otherwise.

Generating SSH Key Pair

Generate the SSH key pair on the local server using OpenSSH. The essential instructions for Linux, macOS, and Windows are outlined below.

Generating SSH Key Pair using PuttyKey Generator

  • If you want to generate SSH keys on Windows then there is the best software as we discuss above is Putty Key Generator. It is a public and private ssh key generator that is suitable for windows as well as Mac OS.
  • Take a look at steps for generating SSH keys on windows using putty key -
  • Download and install PuTTY or PuTTYkey.
  • Open Putty Key Generator Window.
  • Set the Type of key to generate the option to SSH-2 RSA.
  • In the Number of items in a generated key box, enter 2048.
  • Click Generate to generate a public/private key pair.
  • As the key is being generated, move the mouse around the blank area as shown.
  • Click on Save Private key to save this key to the file. To adhere to file-naming conventions, you should give the private key file an extension of .ppk (PuTTY Private Key).
  • Select all of the figures in the Public key for fixing into the OpenSSH authorized_keys file box.
  • Make sure you select all the parts, not just the ones you can view in the small window. If a scroll bar is next to the characters, you aren't recognizing all the characters.
  • Right-click somewhere in the selected text and excellent Copy from the menu.
  • Open a text editor and paste the characters, just as you represented them. Start at the first character in the text editor, and do not include any line breaks.
  • Save the text file in the same folder where you saved the private key, using the .pub extension to indicate that the file includes a public key.
  • If you or others are going to use an SSH client that needs the OpenSSH arrangement for private keys, export the private key -
  1. On the Conversions menu, choose the Export OpenSSH key.
  2. Save the private key in OpenSSH format in the same folder where you saved the private key in .ppk format, using an extension such as .openssh to indicate the file's content.

Linux and MacOS

  • Open the terminal (CTRL+ALT+T).
  • Check for existing keys with -

ls -l ~/.ssh/id*

  • Create the directory using the mkdir command for collecting the new key pair -

mkdir ~/.ssh

  • Change the permissions to 700 -

chmod 700 ~/.ssh

  • The following command starts the key generator -



  • Use the Windows search case to find cmd and open the Command Prompt window.
  • In the prompt, type -


  • The command starts the program for generating the key pair.
  • If you set up a particular place for the keys, type in the path now. Otherwise, Enter to save the keys in the default path.
  • If keys are in this location, the output requires to confirm the overwrite. Type 'Y' to confirm and press Enter to proceed with the setup.
  • Enter the passphrase to encrypt the private key. Re-enter the equivalent passphrase and press Enter to finish creating the key pair.


This article is "Public-key Authentication". It has useful knowledge and helps to create ssh keys using putty. Linux as well as Windows. Thank you for reading this article.

Данный материал является частной записью члена сообщества Club.CNews.
Редакция CNews не несет ответственности за его содержание.
9 месяцев назад
US, California
Информационные технологии

Putty is software designed by Simon Tatham. Putty is the most reliable key generator which is used to create public and private SSH Keys. It supports various network protocols. Download Putty and simply create the user's keys.

Забыли пароль?

Редакция CNews готова принять пресс-релизы компаний на адрес news@cnews.ru.

Приглашаем вас делиться комментариями о материалах CNews на наших страницах платформ Facebook, Telegram и Twitter.