需要免密码登陆的机器
mkdir /root/.ssh

cd /root/.ssh

ssh-keygen -t rsa
cat id_rsa.pub

目标机器
cp -rp id_rsa.pub authorized_keys
vim authorized_keys