If you have
~./ssh/id_rsa.pub already generated you can use it to connect to remote server via
ssh-copy-id with single command.
$ ssh-copy-id email@example.com
You’ll be asked for the password once, and then you can
ssh without typing password again.
$ ssh firstname.lastname@example.org
id_rsa.pub will be automatically appended to
~/.ssh/authorized_keys on the remote machine.
ssh-copy-id can be installed on Mac with brew.
$ brew install ssh-copy-id
Otherwise you can manually append your key to host machine with below command.
ssh email@example.com tee -a .ssh/authorized_keys < ~/.ssh/id_rsa.pu