Add ssh keys and ssh access to a linux server

How to add authorized keys to a server: View the key: cat ~/.ssh/id_rsa.pub Copy and paste the key in here: sudo nano ~/.ssh/authorized_keys