Quick notes for an already well documented method. From a *nix based machine (my iMac while writing this).
ssh-keygen -t rsa -b 4096 -C “email@example.com”
Choose an id filename – on this instance I set: id_rsademo
ssh-copy-id -i ~/.ssh/id_rsademo firstname.lastname@example.org
The connection is to the machine on its ip address – this simply has to be able to resolve so it can use DNS
A good write-up is available here: https://www.ssh.com/ssh/copy-id