本文共 657 字,大约阅读时间需要 2 分钟。
配置ssh互信操作步骤:
[root@hadoop000 ~]# rm -rf ~/.ssh[root@hadoop000 ~]# ssh-keygen[root@hadoop001 ~]# rm -rf ~/.ssh[root@hadoop001 ~]# ssh-keygen
[root@hadoop000 .ssh]# cat id_rsa.pub >> authorized_keys将本机公钥输出到authorized_keys中
[root@hadoop001 .ssh]# scp id_rsa.pub 192.168.137.251:/root/.ssh/id_rsa.pub.hadoop001
[root@hadoop000 .ssh]# cat id_rsa.pub.hadoop001 >> authorized_keys
[root@hadoop000 .ssh]# scp authorized_keys 192.168.137.141:/root/.ssh/
每台机器第一次ssh跳转其他机器都需输入yes 目的 --> known_hosts
之后再登录其他机器就无需密码了。转载于:https://blog.51cto.com/10814168/2115735