On the Client.
user$ssh-keygen -b 1024 -t rsa
Enter file in which to save the key (/user/.ssh/id_rsa):
Created directory '/user/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /user/.ssh/id_rsa.
Your public key has been saved in /user/.ssh/id_rsa.pub.
The key fingerprint is:
Copy key public for the server.
user$ scp id_rsa.pub user@ip_host:/home/user/.ssh/
Rename in server id_rsa.pub to authorized_keys
remoteServer$mv id_rsa.pub to authorized_keys