生成公钥私钥 [root@server0 ~]# ssh-keygen ##生成公钥私钥工具 Generating public/private rsa key pair. Enter file in which to save the key(/root/.ssh/id_rsa):[enter] ##加密字符保存文件(建议用默认) Created directory ‘/root/.ssh’.Enter passphrase (empty for no passphrase): [enter] ##密钥密码,必须>4个字符 Enter same passphrase again: [enter] ##确认密码