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

关于两台服务器非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条回答 默认 最新

相关推荐 更多相似问题