Add ssh key to host in two line ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'