3. 步骤如下:
1)在a上,生成密钥对:
[root@test250 .ssh]# ssh-keygen -t rsa
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 has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
.......
2)将公约复制到b机器上去:
[root@test250 .ssh]# scp id_rsa.pub root@192.168.1.240:/root/.ssh/authorized_keys
root@192.168.1.240's password:
id_rsa.pub 100% 394 0.4KB/s 00:00