转载请注明出处:http://blog.csdn.net/l1028386804/article/details/79399463
假设源主机需要对主机名为node1、node2、node3的目标节点在用户名test下进行无密码访问,则需要一次输入如下命令:
ssh-keygen ssh-copy-id test@node1 ssh-copy-id test@node2 ssh-copy-id test@node3 或者 ssh-keygen -t rsa ssh-copy-id test@node1 ssh-copy-id test@node2 ssh-copy-id test@node3 或者 ssh-keygen -t dsa ssh-copy-id test@node1 ssh-copy-id test@node2 ssh-copy-id test@node3