造成该问题ssh没有设置授权访问照成的。
错误描述Starting namenodes on [192.168.72.102] 上一次登录:四 6月 9 21:39:41 CST 2022pts/1 上 192.168.72.102: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). Starting datanodes 上一次登录:四 6月 9 21:41:36 CST 2022pts/1 上 localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). Starting secondary namenodes [localhost.localdomain] 上一次登录:四 6月 9 21:41:36 CST 2022pts/1 上 localhost.localdomain: Warning: Permanently added 'localhost.localdomain' (ECDSA) to the list of known hosts. localhost.localdomain: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).本机为集群解决方式
创建ssh公私钥
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
以公钥创建授权key
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
授权
chmod 0600 ~/.ssh/authorized_keys



