AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 850152
Accepted
simona
simona
Asked: 2017-05-16 02:30:33 +0800 CST2017-05-16 02:30:33 +0800 CST 2017-05-16 02:30:33 +0800 CST

ssh 错误:权限被拒绝(键盘交互)

  • 772

我正在尝试通过ssh(从 OS X 10.9.5)访问远程系统,但我失败了。我的 ~/.ssh 目录是空的。

 user@wcw-eduroam-XXX-XXX-XXX-XXX:~$ ssh -vvv [email protected]
 OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
 debug1: Reading configuration data /etc/ssh_config
 debug1: /etc/ssh_config line 20: Applying options for *
 debug1: /etc/ssh_config line 102: Applying options for *
 debug2: ssh_connect: needpriv 0
 debug1: Connecting to address.of.domain [XXX.XX.XXX.XXX] port 22.
 debug1: Connection established.
 debug1: identity file /Users/user/.ssh/id_rsa type -1
 debug1: identity file /Users/user/.ssh/id_rsa-cert type -1
 debug1: identity file /Users/user/.ssh/id_dsa type -1
 debug1: identity file /Users/user/.ssh/id_dsa-cert type -1
 debug1: Enabling compatibility mode for protocol 2.0
 debug1: Local version string SSH-2.0-OpenSSH_6.2
 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
 debug1: match: OpenSSH_5.3 pat OpenSSH_5*
 debug2: fd 3 setting O_NONBLOCK
 debug1: SSH2_MSG_KEXINIT sent
 debug1: SSH2_MSG_KEXINIT received
 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
 debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],ssh-rsa,ssh-dss
 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
 debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit: none,[email protected],zlib
 debug2: kex_parse_kexinit: none,[email protected],zlib
 debug2: kex_parse_kexinit: 
 debug2: kex_parse_kexinit: 
 debug2: kex_parse_kexinit: first_kex_follows 0 
 debug2: kex_parse_kexinit: reserved 0 
 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
 debug2: kex_parse_kexinit: ssh-rsa
 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit: none,[email protected]
 debug2: kex_parse_kexinit: none,[email protected]
 debug2: kex_parse_kexinit: 
 debug2: kex_parse_kexinit: 
 debug2: kex_parse_kexinit: first_kex_follows 0 
 debug2: kex_parse_kexinit: reserved 0 
 debug2: mac_setup: found hmac-md5
 debug1: kex: server->client aes128-ctr hmac-md5 none
 debug2: mac_setup: found hmac-md5
 debug1: kex: client->server aes128-ctr hmac-md5 none
 debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
 debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
 debug2: dh_gen_key: priv key bits set: 133/256
 debug2: bits set: 499/1024
 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
 debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
 debug1: Server host key: RSA dc:94:dc:9b:02:8a:8f:9a:07:de:b4:ca:d3:80:65:04
 The authenticity of host 'address.of.domain (146.50.188.202)' can't be established.
 RSA key fingerprint is dc:94:dc:9b:02:8a:8f:9a:07:de:b4:ca:d3:80:65:04.
 Are you sure you want to continue connecting (yes/no)? yes
 Warning: Permanently added 'address.of.domain,146.50.188.202' (RSA) to the list of known hosts.
 debug2: bits set: 527/1024
 debug1: ssh_rsa_verify: signature correct
 debug2: kex_derive_keys
 debug2: set_newkeys: mode 1
 debug1: SSH2_MSG_NEWKEYS sent
 debug1: expecting SSH2_MSG_NEWKEYS
 debug2: set_newkeys: mode 0
 debug1: SSH2_MSG_NEWKEYS received
 debug1: SSH2_MSG_SERVICE_REQUEST sent
 debug2: service_accept: ssh-userauth
 debug1: SSH2_MSG_SERVICE_ACCEPT received
 debug2: key: /Users/user/.ssh/id_rsa (0x7fe8e940c740),
 debug2: key: /Users/user/.ssh/id_rsa (0x0),
 debug2: key: /Users/user/.ssh/id_dsa (0x0),
 debug3: input_userauth_banner

 debug1: Authentications that can continue: keyboard-interactive
 debug3: start over, passed a different list keyboard-interactive
 debug3: preferred publickey,keyboard-interactive,password
 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: 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 (keyboard-interactive)
linux
  • 3 3 个回答
  • 17669 Views

3 个回答

  • Voted
  1. Best Answer
    Neeraj Sharma
    2017-05-16T03:15:11+08:002017-05-16T03:15:11+08:00

    SSH 通常更喜欢两种身份验证方式,即用户名-密码组合和用户名-公钥组合。

    您的服务器似乎只支持用户名-公钥身份验证。请咨询您的管理员。如果我是对的,请向他询问与您的用户名相关的公钥并使用公钥登录。

    • 2
  2. julian
    2018-02-02T09:03:33+08:002018-02-02T09:03:33+08:00

    如果您为密钥和 2FA(使用 google auth)配置了服务器,则需要为每个用户启用 2FA 。

    使用工作用户登录服务器

    su user
    
    google-authenticator 
    

    按照所有步骤

    • 2
  3. Craig
    2019-07-19T14:05:23+08:002019-07-19T14:05:23+08:00

    很抱歉发布 necro-post,但这对我有用,我还没有在任何其他容易返回的搜索结果中找到这个解决方案(希望它会帮助其他人):

    我有一个网页,其服务器通过 ssh 访问其他“节点”(即其他服务器)。因此,当 ssh 在服务器上执行时,它是以用户 'apache' 的身份执行的(显然 Apache 正在服务器上运行)。

    当尝试访问某些节点时,返回“权限被拒绝(键盘交互)”。

    在服务器上编辑 /etc/passwd 解决了这个问题。改变:

    apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
    

    至:

    apache:x:48:48:Apache:/usr/share/httpd:/bin/bash
    
    • 2

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve