服務器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] #複製密鑰