lp180361* 2017-12-04 09:28 采纳率: 50%
浏览 4897
已采纳

关于两台服务器非root用户之间的ssh免密登录,解决问题必采纳

A服务器和B服务器,现在我们要A上的liupan用户免密访问B上的hadoop用户
(root用户可以正常免密访问,已测)
A端输入命令ssh -vv 172.18.3.19,日志如下

debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/liupan/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Trying private key: /home/liupan/.ssh/id_dsa
debug1: Trying private key: /home/liupan/.ssh/id_ecdsa
debug1: Trying private key: /home/liupan/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

B端查看/var/log/secure文件日志如下:

Dec 4 01:18:51 hadooptest sshd[3829]: Invalid user liupan from 172.18.3.239
Dec 4 01:18:51 hadooptest sshd[3830]: input_userauth_request: invalid user liupan
Dec 4 01:18:52 hadooptest sshd[3830]: Connection closed by 172.18.3.239
网上找到的解决方案是在/etc/ssh/sshd_config中添加AllowUsers liupan
但是并没有什么用
(修改配置后执行过service sshd restart,不是配置未加载的原因),报错日志依然是上面这样的日志,求大牛普及普及

  • 写回答

4条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 Quantlib求discount factors
      • ¥15 JS宏提取满足比率的字符区段
      • ¥20 webapi项目的XUnitTest单元测试怎么注入token和自写拦截器(filter)(语言-c#)
      • ¥15 exe和xml必须在一个文件夹才能打开exe文件
      • ¥15 房号如何排序,sql或算法
      • ¥15 macOS使用IDEA 2022.2.4打包JDK6项目报错
      • ¥20 使用matlab进行含参数的最优化求解及数值模拟
      • ¥20 MATLAB找出一维变量中的局部极大值和局部极小值,并进行运算
      • ¥15 有Chang求三维杆单元几何非线性分析matlab代码
      • ¥50 使用unity easyar录屏功能。录屏视频整体色调很暗