Login to your Ubuntu client with the username for which you want to create a key pair. Create the key with the following command:
ssh-keygen
The keys will be saved in your home directory under: /.ssh/id_rsa
Now copy your public key to the server that you want to connect to crom your client without using a password:
ssh-copy-id myusername@remote_host
That’s it. Now try to connect to your server with that username. If all works fine, no password will be asked for.
For a more comprehensive tutorial with more explanations, please consult this excellent page.