1.虚拟机A 生成公钥 私钥
[root@svr7 ~]# ssh-keygen #一路回车
[root@svr7 ~]# ls /root/.ssh/ #查看公钥 私钥
2.虚拟机A 传递公钥 到对方服务器
[root@svr7 ~]# ssh-copy-id root@192.168.4.207
3.虚拟机A 验证
[root@svr7 ~]# ssh root@192.168.4.207
原文:https://www.cnblogs.com/momo6656/p/14848387.html