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: 1732 | 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:


[2015-07-12][Open System-Linux]
EGREP or extended grep in Linux to search patterns
[2014-11-19][Open System-Linux]
ETHTOOL : A tool in Linux to display or change ethernet card setting
[2015-01-12][Open System-Linux]
W3M : A text based web browser and pager from Linux terminal
[2014-12-24][Open System-Linux]
XARGS command in Linux with examples
[2014-09-21][Open System-Linux]
How to define command prompt strings in Linux : what are $PS1, $PS2, $PS3 and $PS4?

Total comments: 0
ComForm">
avatar