One of the option to connecting to an SSH server is via the Public Key Authentication method. For this you need to have a public and private key pair and for your public key to be available in the server's authorized_keys file.
If you're on Windows then you're likely to connect to a remote SSH server using PuTTY and as such you'll need a PuTTY Private Key (ppk) file and the associated public key which you can generate using PuTTY Key Generator (PuTTYGen).
Steps to connect to SSH server using public key via PuTTY:
Create a public and private key pair if you dont already have one.
Copy your public key to server's authorized_keys
Enter connection details such as Host Name
/ IP address
Navigate to Connection
from the sidebar menu.
Click on the Browse
button to look for your PuTTY Private Key
Select your PuTTY Private Key
from the stored location and click on the Open
Click on the Open
button to start the connection.
if a security alert pops up as this is your first connection to the server and the server's key fingerprint is not in your PuTTY
Enter the username that you want to connect as and press enter.
Enter the passphrase for the key if your key is protected by a passphrase.
You should be able to log in without providing your password to the system.
Author: Mohd Shakir Zakaria
Cloud architect by profession but always consider himself as a developer, entrepreneur and an opensource enthusiast.
Discuss the article:
Comment anonymously. Login not required.