Home » 2015 » May » 25 » Password-less Login to Linux/Unix Servers in Putty

6:05 PM
Password-less Login to Linux/Unix Servers in Putty

Hello Unix Lovers !!

Here, in this article, we shall learn how to login to Linux servers without username/password in PUTTY.

Just follow below simple steps and you can login to any of your linux server by just one click without entering any username or password:


  • Download Putty client from here and install it.
  • Search for puttygen on Start Menu and run puttygen.exe. Alternatively, you can go to Putty folder and run Puttygen.exe

 

pswd1

 

  • Now we are going to Generate the Public/Private Key pair using SSH algorith for password-less authentication. For that, just select Type of key to generate as SSH-2 RSA and Number of bits in generated key as 2048.
  • Now click on Generate button.

 

pswd2

 

 

  • To progres with the key generation, you need to move your cursor at the empty space shown as in above picture. It helps to generate the key in random fashion.
  • Once the keys are genearted, you will get the OpenSSH authorized key , public key and the private which can be saved.

 

pswd3

 

  • You can give a unique name in key comment field as shown in above picture. Now save the public key and private on local disk of your computer.

pswd5

 

  • Also save the authorized key generated to a text editor becuase you need this to save/append into your ~/.ssh/authorized_keys file on the Linux server to be logged on.

 

pswd5

 

  • Make sure no body can get the keys, specially the private key, if someone gets the private key, he/she can login to your server without password.

  • Now go to the Unix server to log into, go to home directory.
  • Create a folder .ssh if its not there.
  • Go to .ssh folder and create a file authorized_keys if its not existing.
  • Paste the authorized key which you have saved into text editor. If the file is already present and having some data, just add the new authorized_keys at new line.

  • Make sure the file authorized_keys is having 700 file permissions, else set it(chmod -R 700 .ssh).
  • Exit from the server.
  • Now open Putty configuration window and enter server name to login to.

 

pswd6


  • Now go to SSH --> Auth Menu and Browse the private key file from local computer.
  • In Session menu, enter the Host Name(or IP address) as [email protected] as shown below:

 

pswd7

  • Thats it. Now click on Open Button. You will be logged into the server using the username supplied and it will not ask you for any password!
  • Enjoy password less authentication.
 
 

Category: Open System-Linux | Views: 1701 | Added by: shanky | Tags: private key, ssh-keygen, authorized_keys, unix, SSH, linux, linux server, login, password less authentication, public key | Rating: 5.0/1

Related blogs


You may also like to see:


[2014-09-24][Open System-Linux]
Set, unset, display shell behaviour options : SHOPT command in Linux
[2016-05-11][Open System-Linux]
An example to understand bash exit code $? in linux.
[2015-06-08][Open System-Linux]
CHAGE command in LINUX
[2014-10-24][Open System-Linux]
HEXDUMP command in Linux to display the file content in decimal, hexadecimal, octal format
[2016-01-23][Open System-Linux]
Some useful examples of netstat command in Linux for network statistics

Total comments: 0
ComForm">
avatar