ssh-keygen -t rsa
ssh root@myserver mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh root@myserver 'cat >> .ssh/authorized_keys'
ssh-copy-id -i .ssh/id_rsa_pub root@myserver
ssh root@myserver "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
chmod 700 .ssh chmod 640 .ssh/authorized_keys
ssh root@myserver