1.登录A机器 2.ssh-keygen -t rsa,将会生成密钥文件和私钥文件 id_rsa,id_rsa.pub或id_dsa,id_dsa.pub Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): [直接回车即可] Enter passphrase (empty for no passphrase): [若要建立无密码的ssh信任关系,这里直接回