It's dead easy to do:
Code:
ssh-keygen -t rsa -f mykeypair
Just press return when it asks for a password.
It'll create two files, mykeypair (which is your private key, so keep it safe), and mykeypair.pub (the public key that everyone can see). Append the mykeypair.pub file to the <userhomedir>/.ssh/authorized_keys file on the server (if it doesn't exist just create it). Then move your private key (in this case 'mykeypair' to your home/.ssh/id_rsa file, and move the mykeypair.pub file to home/.ssh/id_rsa.pub.
That should be job done. Try and log into the server. ssh will (should) handle to key exchange automatically.
So the complete steps will be:
Code:
ssh-keygen -t rsa -f mykey
scp mykey.pub <username@server>:.ssh/authorized_keys
mv mykey ~/.ssh/id_rsa
mv mykey.pub ~/.ssh/id_rsa.pub
There's plenty of tutorials on the web if you get stick. Google is your friend. It's the same for all distros.
Good luck.