首先在101的机器上生成密钥(如果已经生成可以跳过):
ssh-keygen -t rsa
其中:id_rsa为私钥文件,id_rsa.pub为公钥文件
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 2122 root@IP "