1 ssh-keygen -t rsa 生成密钥 2 ssh-copy-id -i ~/.ssh/id_rsa.pub “-p 222 c1@server" -p 指定端口,默认可省略 拷贝到服务器的.ssh/authorized_keys