這篇博客內(nèi)講的算是比較詳細適用的https://blog.csdn.net/situliang/article/details/72904449
一棕洋、情況
在虛擬機搭建Hadoop環(huán)境時,出現(xiàn)localhost.localdomain: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)問題物舒,這個問題是由于即使是本機使用SSH服務也是需要對自己進行公私鑰授權的妓盲,所以在本機通過ssh-keygen創(chuàng)建好公私鑰诡延,然后將公鑰復制到公私鑰的認證文件中就可以了
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys