- 在 ds1 上,切换到部署用户并配置 ssh 本机免密登录
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys
注意:正常设置后,xxx 用户在执行命令 ssh localhost 是不需要再输入密码
- 在 ds1 上,配置部署用户 xxx ssh 打通到其他待部署的机器
for ip in ds2 ds3; # 请将此处 ds2 ds3 替换为自己要部署的机器的 hostname do ssh-copy-id $ip # 该操作执行过程中需要手动输入 dolphinscheduler 用户的密码 done # 当然 通过 sshpass -p xxx ssh-copy-id $ip 就可以省去输入密码了



