cd /root/.ssh
chmod 600 id_rsa
chmod 644 id_rsa.pub
cat ~/.ssh/id\_rsa.pub >> ~/.ssh/authorized\_keys
if [ -s /etc/ssh/sshd_config ]; then
	sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config
fi
echo "RSAAuthentication yes" >> /etc/ssh/sshd_config
echo "StrictModes no" >> /etc/ssh/sshd_config
echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config
echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config
systemctl restart sshd