You can generate ssh private and public keys to use in ssh connection with puttygen (can be downloaded from link).
Step 1. Open puttygen, choose ‘ssh-2 rsa’ or ‘ssh2 dsa’ and push ‘Generete’ button (move mouse in ‘key’ area).
Step 2. Push ‘save private key’ to save keyfile (you can set password to protect private key).
Step 3. Save text from ‘public key for pasting into OpenSSH authorized_keys file’:
Step 4. Login to remote Linux server (presumably OpenSSH server already installed). Note: lately with this username you should connect with SSH.
Step 5. Create .ssh folder (mkdir ~/.ssh) and change permissions (chmod 700 ~/.ssh).
Step 6. Create file authorized_keys2 in .ssh folder and paste information from ‘Step 3’ into it (your_favorite_editor ~/.ssh/authorized_keys2).
Step 7. Configuring PuTTY:
- Enter hosthame of remote server in ‘Session’ category.
- In ‘Data – Connection – Auto-login username’ enter username that used in Sstep 4’.
- In ‘Connection – SSH – Auth – Private key file for authentication’ put fullpath to file saved in ‘Step 2’.
- You can save this settings in ‘Session’ category and push ‘Open’ (Note: if you set private key password at this time you should enter it, else putty connect to remote server with private/public key pairs).
Author: Andrey Makovetsky
401 total views