Trading off security for convenience never ends well...
Could you use ssh-copy-id
from the openssh-client
package?
From man ssh-copy-id
:
ssh-copy-id is a script that uses ssh to log into a remote machine and append the indicated identity file to that machine's ~/.ssh/authorized_keys file.