参考一下下面的帖子 https://docs.pingcap.com/zh/tidb/stable/check-before-deployment/#手动配置-ssh-互信及-sudo-免密码
https://asktug.com/t/topic/95777