ssh-keygen -t rsa ssh b@B mkdir -p .ssh cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' ssh b@B