赞
踩
1. 设置节点双方互信 与 自身ssh免密
以节点192.168.3.20、192.168.3.21为例
[root@192.168.3.20]#ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.3.21
[root@192.168.3.21]#ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.3.20
注:如果不是默认的端口,可以这样写
ssh-copy-id -i ~/.ssh/id_rsa.pub “-p 2022 root@192.168.3.21”
[root@192.168.3.20]cd /root/.ssh
[root@192.168.3.20]cat id_rsa.pub >> authorized_keys
[root@192.168.3.21]cd /root/.ssh
[root@192.168.3.21]cat id_rsa.pub >> authorized_keys
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。