1. 生成秘钥 ssh-keygen -t rsa -C "xxxx@xxxx.com" 之后一直点yes 2. 查看秘钥 cat /root/.ssh/id_rsa.pub 参考: CentOS 生成SSH-KEY