服务器ssh免密登陆:
1、在每台服务器上都执行ssh-keygen -t rsa 生成密钥
[root@jw01 .ssh]# ssh-keygen -t rsa
[root@jw02 .ssh]# ssh-keygen -t rsa
[root@kt01 .ssh]# ssh-keygen -t rsa
[root@kt02 .ssh]# ssh-keygen -t rsa
2、复制公钥到其他节点
ssh-copy-id -i .ssh/id_rsa.pub [email protected] #复制密钥
ssh-copy-id -i .ssh/id_rsa.pub [email protected] #复制密钥