免密登录配置 生成SSH公钥,私钥. # ssh-keygen -t rsa 连续三次回车. 将公钥拷贝到目标服务器. # ssh-copy-id server-2 连接目标服务器. # ssh server-2