Download And Extract Putty, You Need the Full Package, not just putty.exe.
Now Run puttygen.exe
press Generate button, move mouse. Once the keys are generated, type your key passphrase (choose a "hard to guess" one). Save Public key. Save Private key.

Configuring Linux Server
From The Root Shell(Example Using Username sshtest):
adduser sshtest --disabled-password
Now Do the Following:
su sshtest
cd /home/sshtest
mkdir .ssh
chmod 700 .ssh
cd .ssh
Now we need to open authorized_keys2:
nano authorized_keys2
Next cut & paste your public ssh key, on ONE LINE (THIS is very IMPORTANT!!!)
Notes:
Do not add the email@example.com at the end of the line.
Do not add the BEGIN PUBLIC KEY or END PUBLIC KEY.
Do not add the rsa-key-20090614 at the end.
Make sure, there is ssh-rsa at the beginning.
example:
ssh-rsa AAAAB3NzaC1yc2ELAABBJQAAAIBzPeFQv+295iKzuuPF0jE9429pSHVpDwBvAR9EstmYh...
adduser sshtest --disabled-password
Now Do the Following:
su sshtest
cd /home/sshtest
mkdir .ssh
chmod 700 .ssh
cd .ssh
Now we need to open authorized_keys2:
nano authorized_keys2
Next cut & paste your public ssh key, on ONE LINE (THIS is very IMPORTANT!!!)
Notes:
Do not add the email@example.com at the end of the line.
Do not add the BEGIN PUBLIC KEY or END PUBLIC KEY.
Do not add the rsa-key-20090614 at the end.
Make sure, there is ssh-rsa at the beginning.
example:
ssh-rsa AAAAB3NzaC1yc2ELAABBJQAAAIBzPeFQv+295iKzuuPF0jE9429pSHVpDwBvAR9EstmYh...
Now set the chmod on the file:
chmod 600 authorized_keys2
Adding The Private key to PuTTY SSH authentication agent
Run the PuTTY SSH authentication agent PAGEANT.EXE. Once loaded it appears in the systray
Right-Click on it, and select Add key. Now Select your private key file, and type in your passphrase when you add the key. The Pageant works as passphrase storage.
Right-Click on it, and select Add key. Now Select your private key file, and type in your passphrase when you add the key. The Pageant works as passphrase storage.


No comments:
Post a Comment