SSH权限错误

时间:2015-04-27 17:41:12

标签: linux ssh

我见过许多与ssh权限相关的帖子否认但仍然是我的无能为力。

debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/siddharthan/.ssh/id_rsa
debug3: no such identity: /home/siddharthan/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/siddharthan/.ssh/id_dsa
debug3: no such identity: /home/siddharthan/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/siddharthan/.ssh/id_ecdsa
debug3: no such identity: /home/siddharthan/.ssh/id_ecdsa: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: userauth_kbdint: disable: no info_req_seen
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).

从上面我可以说它正在.ssh文件夹中搜索私钥。但在下面的代码段中,很明显相应的文件位于.ssh文件夹中。

total 12
-rw-r--r-- 1 siddharthan siddharthan 751 Apr 27 17:40 keyforHpc
-rw-r--r-- 1 siddharthan siddharthan 606 Apr 27 17:40 keyforHpc.pub
-rw-r--r-- 1 siddharthan siddharthan 222 Apr 27 19:29 known_hosts

我已经使用了大约一个月,我刚开始遇到这个问题。有人可以提供一些建议吗?

2 个答案:

答案 0 :(得分:1)

debug1: Trying private key: /home/siddharthan/.ssh/id_rsa
debug1: Trying private key: /home/siddharthan/.ssh/id_dsa
debug1: Trying private key: /home/siddharthan/.ssh/id_ecdsa

VS

-rw-r--r-- 1 siddharthan siddharthan 751 Apr 27 17:40 keyforHpc

这些文件名不匹配。它正在寻找id_rsaid_dsaid_ecdsa,您有keyforHpc

答案 1 :(得分:0)

做一个“man sshd”并阅读AUTHORIZED_KEYS FILE FORMAT部分。