操作步骤: 1.主机A 生成公钥id_rsa.pub文件并导出该文件 root@mytest:~# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification