Activities

October 2011
M T W T F S S
« Sep   Nov »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Putty : Private key file authentication to Linux server

We all uses user name and password for accessing servers/services in various places. It’s must be a difficult if someone has shared the access details or once password is compromised. This may happen in many ways an email hack or system hack can expolore your password to web.

SSH supporting file based authentication. So that anyone who have this file can access the server by only by sharing the server name and user name. You can also disabled/cancel this type of authentication in ssh by emptying the file or removing the suspected users private key from “~/.ssh/authorized_keys” file.

There are 3 steps

1. You need puttygen.exe (download it from the web)
2. Generate private key and save it
3. Copy the respective public key file and paste it on servers”/.ssh/authorized_keys” file
4. Download putty and choose the option “auth” under ssh tree and choose the private key file that were saved on your local desktop.

Generate private key file and copy the public key part from it.

SSH to the remote server and paste the public key shown on the puttygen screen.

Using username "liju".
liju@mysite.com's password:
[liju@host ~]$ vi ~/.ssh/authorized_keys
[liju@host~]$ chmod 600 ~/.ssh/authorized_keys

Pls should need to change the file mode to 600. (No others can access this file) otherwise you will get “refused key file ” messages.

Amazon linux servers are using this password less authentication.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>