以服务器node1 node2 为例,实现node1到node2的免密登录:
1.在node1上执行:ssh-keygen -t rsa
2.确保node2的/etc/ssh/sshd_config配置文件中有配置:
PermitRootLogin yes
StrictModes no
PubkeyAuthentication yes
PasswordAuthentication yes
3.在node1上执行:ssh-copy-id node2
以服务器node1 node2 为例,实现node1到node2的免密登录:
1.在node1上执行:ssh-keygen -t rsa
2.确保node2的/etc/ssh/sshd_config配置文件中有配置:
PermitRootLogin yes
StrictModes no
PubkeyAuthentication yes
PasswordAuthentication yes
3.在node1上执行:ssh-copy-id node2