1. Download a Puttygen-Client
2. Create and save Public Key by the puttygen-client
3. Generate and save a Private-Key (this file is very important and shouldn`t be lost)
4. Create a user on the server, who will use this key
5. Login with created user to the system and execute follow commands:
mkdir .ssh
chmod 700 .ssh
cd .ssh
6. Open the file 'authorized_keys' and put the generated public key string:
ssh-rsa <string_aus_public_key>
7. Change the data access privileges:
chmod 600 authorized_keys
8. Restart SSH-Service
/etc/init.d/ssh restart
9. Test the key login functionality
10. If the test was successful, then login as root and edit the /etc/ssh/sshd_config file:
# line 50: uncomment and change to 'no'
PasswordAuthentication no
11. Restart SSH service. The login without a key after executing of this command is not possible anymore:
/etc/init.d/ssh restart
More informations: