请教一个 ssh 问题,ssh client 如何强制使用 keyboard-interactive 进行登录?

2014-10-21 16:24:16 +08:00
 ghy459
已知某一台服务器只允许使用 keyboard-interactive 进行 ssh 登录。
我在本地用 ssh test@abc.com 进行登录的时候会提示:

Permission denied (publickey,keyboard-interactive).

试过修改 ssh_config 的 PreferredAuthentications 但没有效果。我应该使用什么样的姿势才能进行登录呢?

(PS.使用 SecureCRT 能通过 keyboard-interactive 进行登录,不会是服务器或者账号存在问题。)
13607 次点击
所在节点    SSH
6 条回复
pfitseng
2014-10-21 16:48:11 +08:00
密码形式有两种,password和keyboard-interactive,前者能通过保存的密码登录,后者只能通过键盘交互登录。你先试下KbdInteractiveAuthentication yes看看,不行就 ssh -v看输出到底哪里问题。
ghy459
2014-10-21 17:20:44 +08:00
@pfitseng KbdInteractiveAuthentication已改为 yes,但貌似根本就没进行这个类型的验证?

debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/ghy459/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /Users/ghy459/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
pfitseng
2014-10-21 17:35:13 +08:00
ssh -vvv 看看
ghy459
2014-10-22 11:12:08 +08:00
@pfitseng 今天回来 -vvv ,输出太长了我放到博客上,帮忙看看吧,谢谢~

http://hack0nair.me/ssh.txt
pfitseng
2014-10-22 11:25:24 +08:00
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: /Users/ghy459/.ssh/id_dsa
debug3: no such identity: /Users/ghy459/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
pfitseng
2014-10-22 11:26:04 +08:00
你要么吧本地ssh升级试试,或者重新编译一份,难道编译的时候没把keyboard-interactive编进去?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/140549

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX