MacOS SSH connect using key
To connect using SSH keys you need to copy the key from your machine to the remote server using ssh-copy-id user@remote_ip_address.

You will be asked to enter the password for the remote server and the key will be copied.

If you generated a key pair using a password then you will always have to enter that password when connecting. If not, you can simply connect using ssh user@remote_ip_address and you will be connected to the remote machine.