Generate key, link with server
ssh-keygen -f homeserver
Generates a .pub key and private key.
Copy .pub key to server
ssh-copy-id -i homeserver.pub root@<homeserver-ip>
This copies the file into the authorized_keys
file on the server.
Define a host entry
vim ~/.ssh/config
Host homeserver
HostName server_ip_or_hostname
User myusername
IdentityFile ~/.ssh/my_custom_key # private key