Friday, March 28, 2014

create SSH key using puttygen and connect to linux server

here will show you how to create public key and connect to Linux server.
First of all, you need to install puttygen, you can get it from http://winscp.net/download/puttygen.exe

1. Click Generate 


2. Just move around your mouse cursor inside the box until it done process


3. Copy the key and paste to your server at ./ssh/authorized_keys and save down the private key


If you want to enable password when connect using this private key, just enter password here before you click save private key. everytime you use this private key to connect to your server, it will ask for password



Now you can try connect using Putty
remember to select your private key at Connection > SSH > Auth




Troubleshoot
1. If it show error message " server refused our key"
please make sure the file at ./ssh/authorized_keys is using 700 permission

2. For other error, you can enable LogLevel DEBUG3 at /etc/ssh/sshd_config. Then monitor the log at /var/log/secure



No comments:

Post a Comment