无法使用authorized_keys连接到基于Cygwin的OpenSSH服务器

时间:2014-03-20 09:32:13

标签: windows ssh cygwin openssh sshd

我在运行Cygwin的Windows 7中设置SSHD服务时遇到问题。 我已经关注了this tutorial并且它第一次运行,但重新启动后,存储在~/.ssh/authorized_keys中的公钥将不允许我从外部CLI访问此计算机。此外,密码授权也不起作用,我甚至尝试使用passwd testinguser在cygwin中重置密码。

这些是我到目前为止所做的步骤:

  • 重新安装Cygwin SSHD服务(我还删除了除testuser之外的其他Windows用户帐户)
  • 再次重新运行ssh-host-config,如教程
  • 中所述
  • 从Cygwin控制台重置testinguser密码
  • 将权限设置为.authorized_keys&父文件夹:

    chmod 700 ~/.ssh & chmod 600 ~/.ssh/authorized_keys

  • 禁用Windows Defender防火墙和其他AV软件(httpd效果很好)
下面的

ssh <host> -v命令的结果:

debug1: Remote protocol version 2.0, remote software version WeOnlyDo 2.1.3
debug1: no match: WeOnlyDo 2.1.3
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1p1 Debian-4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 5d:9b:19:36:1c:67:1d:c9:ef:91:7c:1e:e8:3b:ba:12
debug1: Host '10.1.0.46' is known and matches the RSA host key.
debug1: Found key in /home/banasiak/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/banasiak/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentications that can continue: password,publickey
debug1: Offering RSA public key: banasiak@pc-71-wroc
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentications that can continue: password,publickey
debug1: Trying private key: /home/banasiak/.ssh/id_dsa
debug1: Trying private key: /home/banasiak/.ssh/id_ecdsa
debug1: Next authentication method: password

我还应该检查一些其他内容吗? SSHD服务正常运行,我可以启动并暂停它而不会出现任何错误。

0 个答案:

没有答案