ghy459
0D
V2EX  ›  SSH

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

  •  
  •   ghy459 · Oct 21, 2014 · 14674 views
    This topic created in 4417 days ago, the information mentioned may be changed or developed.
    已知某一台服务器只允许使用 keyboard-interactive 进行 ssh 登录。
    我在本地用 ssh [email protected] 进行登录的时候会提示:

    Permission denied (publickey,keyboard-interactive).

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

    (PS.使用 SecureCRT 能通过 keyboard-interactive 进行登录,不会是服务器或者账号存在问题。)
    6 replies  •  2014-10-22 11:26:04 +08:00
    pfitseng
    pfitseng
    Oct 21, 2014❤️1
    1
    密码形式有两种,password和keyboard-interactive,前者能通过保存的密码登录,后者只能通过键盘交互登录。你先试下KbdInteractiveAuthentication yes看看,不行就 ssh -v看输出到底哪里问题。
    ghy459
    ghy459
    OP
    Oct 21, 2014
    2
    @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
    pfitseng
    Oct 21, 2014
    3
    ssh -vvv 看看
    ghy459
    ghy459
    OP
    Oct 22, 2014
    4
    @pfitseng 今天回来 -vvv ,输出太长了我放到博客上,帮忙看看吧,谢谢~

    http://hack0nair.me/ssh.txt
    pfitseng
    pfitseng
    Oct 22, 2014
    5
    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
    pfitseng
    Oct 22, 2014
    6
    你要么吧本地ssh升级试试,或者重新编译一份,难道编译的时候没把keyboard-interactive编进去?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2568 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 11:21 · PVG 19:21 · LAX 03:21 · JFK 06:21
    ♥ Do have faith in what you're doing.