|echo "Enter ssh username & host you want to add your key to in the following format: email@example.com"|
|IP=$(curl -Sfs https://wtfismyip.com/text)|
|echo 'Adding Key to '$host': from="'$IP'"' $KEY|
|echo 'from="'$IP'"' $KEY | ssh $host 'cat >> ~/.ssh/authorized_keys'|
Sometime this doesn't work and you still need to enter a password..
Try the following:
Put the public key in .ssh/authorized_keys2