一、客户端生成密钥对 #生成 密钥对 路径 ~/.ssh/id_rsa ssh-keygen -t rsa -f ~/.ssh/id_rsa 二、将公钥发送给服务端的家目录 ssh-copy-id 172.17.1.116: ssh