配置了互信 deploy 时ssh报错

【 TiDB 使用环境】生产环境
【 TiDB 版本】v4.0.16
【复现路径】做过哪些操作出现的问题
tiup cluster deploy tidb v4.0.16 top.yaml --user tidb -p

Error: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@11.11.143.14:22’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c “test -d /tidb || (mkdir -p /tidb && chown tidb:$(id -g -n tidb) /tidb)”}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
【遇到的问题:问题现象及影响】
【资源配置】
【附件:截图/日志/监控】

tidb用户是否配置了sudo权限

配了互信不用输入密码了,不配才要输入密码

  • 如果是密钥方式,可以通过 -i 或者 --identity_file 来指定密钥的路径。
  • 如果是密码方式,可以通过 -p 进入密码交互窗口。
  • 如果已经配置免密登录目标机,则不需填写认证。
    配了互信直接把-p去了

楼上说的对,配了互信,就不用再-p拉

登录tiup的 服务器,依次对节点进行tidb用户的互信配置。
TiDB 环境与系统配置检查 | PingCAP 文档中心

有两篇内容可能可以帮助到你:

https://docs.pingcap.com/zh/tidb/stable/check-before-deployment#手动配置-ssh-互信及-sudo-免密码