12345678
#!/bin/bashhost=$1ssh-keygen -t rsa -P ''ssh-copy-id -i ~/.ssh/id_rsa.pub ${host}#scp /root/.ssh/id_rsa.pub root@${host}:/root/.ssh/authorized_keyschmod 600 /root/.ssh/authorized_keys