V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ghy459
V2EX  ›  SSH

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

  •  
  •   ghy459 · 2014-10-21 16:24:16 +08:00 · 13731 次点击
    这是一个创建于 3714 天前的主题,其中的信息可能已经有所发展或是发生改变。
    已知某一台服务器只允许使用 keyboard-interactive 进行 ssh 登录。
    我在本地用 ssh [email protected] 进行登录的时候会提示:

    Permission denied (publickey,keyboard-interactive).

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

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

    http://hack0nair.me/ssh.txt
    pfitseng
        5
    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
        6
    pfitseng  
       2014-10-22 11:26:04 +08:00
    你要么吧本地ssh升级试试,或者重新编译一份,难道编译的时候没把keyboard-interactive编进去?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1131 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 18:23 · PVG 02:23 · LAX 10:23 · JFK 13:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.