Ubuntu 为hadoop设置无密码ssh
我正试图在ubuntu上设置一个本地的、无密码的ssh来与hadoop一起使用,这一过程中的每一步都在与我斗争。最初我可以运行start-dfs.sh,但我意识到我运行的是root,你不应该这样做(所以我理解) 我一直在使用这里的说明: 但大多数网站似乎都有相同的三个步骤:Ubuntu 为hadoop设置无密码ssh,ubuntu,hadoop,ssh,hdfs,Ubuntu,Hadoop,Ssh,Hdfs,我正试图在ubuntu上设置一个本地的、无密码的ssh来与hadoop一起使用,这一过程中的每一步都在与我斗争。最初我可以运行start-dfs.sh,但我意识到我运行的是root,你不应该这样做(所以我理解) 我一直在使用这里的说明: 但大多数网站似乎都有相同的三个步骤: $ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ chmo
$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 0600 ~/.ssh/authorized_keys
我甚至没有收到一个错误…当我尝试运行ssh localhost
时,我得到一个密码提示,我输入的任何内容都不能消除它。老实说,我甚至不介意为ssh输入密码,只要hdfs的东西可以工作
我的sshd_config文件在搜索解决方案时发生了很大变化,所以我在下面上传了它,以防出现问题。我不知道还能提供什么,但如果有人需要日志或输出,我很乐意提供。提前谢谢
请参考下面的URL,其中包含逐步可视化 希望这有帮助强> 范例 设置环境 SSH客户端:192.168.0.12(Fedora21) SSH远程主机:192.168.0.11(CentOS 7) 步骤1:在–(192.168.0.12)上创建身份验证SSH Kegen密钥 步骤2:在–192.168.0.11上创建.ssh目录
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 mkdir -p .ssh
The authenticity of host '192.168.0.11 (192.168.0.11)' can't be established.
RSA key fingerprint is 45:0e:28:11:d6:81:62:16:04:3f:db:38:02:la:22:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.11' (ECDSA) to the list of known hosts.
sheena@192.168.0.11's password: [Enter Your Password Here]
[tecmint@tecmint ~]$ cat .ssh/id_rsa.pub | ssh sheena@192.168.0.11 'cat >> .ssh/authorized_keys'
sheena@192.168.1.2's password: [Enter Your Password Here]
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
sheena@192.168.0.11's password: [Enter Your Password Here]
步骤3:将生成的公钥上载到–192.168.0.11
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 mkdir -p .ssh
The authenticity of host '192.168.0.11 (192.168.0.11)' can't be established.
RSA key fingerprint is 45:0e:28:11:d6:81:62:16:04:3f:db:38:02:la:22:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.11' (ECDSA) to the list of known hosts.
sheena@192.168.0.11's password: [Enter Your Password Here]
[tecmint@tecmint ~]$ cat .ssh/id_rsa.pub | ssh sheena@192.168.0.11 'cat >> .ssh/authorized_keys'
sheena@192.168.1.2's password: [Enter Your Password Here]
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
sheena@192.168.0.11's password: [Enter Your Password Here]
步骤4:在–192.168.0.11上设置权限
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 mkdir -p .ssh
The authenticity of host '192.168.0.11 (192.168.0.11)' can't be established.
RSA key fingerprint is 45:0e:28:11:d6:81:62:16:04:3f:db:38:02:la:22:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.11' (ECDSA) to the list of known hosts.
sheena@192.168.0.11's password: [Enter Your Password Here]
[tecmint@tecmint ~]$ cat .ssh/id_rsa.pub | ssh sheena@192.168.0.11 'cat >> .ssh/authorized_keys'
sheena@192.168.1.2's password: [Enter Your Password Here]
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
sheena@192.168.0.11's password: [Enter Your Password Here]
步骤5:不使用密码从192.168.0.12登录到192.168.0.11服务器
[tecmint@tecmint ~]$ ssh sheena@192.168.0.11
发布调试日志,查看服务器日志,打开服务器上的调试日志级别。问题中的信息不够,谢谢你的回复。我已收集日志并将其发布到:密钥被拒绝。服务器调试日志将告诉您更多信息。虽然没有服务器,但这都是在本地完成的。然后您将在本地运行ssh服务器…虽然此链接可能会回答问题,但最好在此处包含答案的基本部分,并提供链接供参考。如果链接页面发生更改,仅链接的答案可能无效。-@约翰穆塔菲斯做了必要的改变!!!。。。谢谢你的建议,我在发帖的时候会一直记住你的建议!!!。。。