1

我在运行 Cygwin 的 Windows 7 中设置 SSHD 服务时遇到问题。我已经按照本教程进行了操作,它第一次工作,但重新启动后存储的公钥~/.ssh/authorized_keys将不允许我从外部 CLI 访问这台机器。此外密码授权也不起作用,我什至尝试在 cygwin 中使用passwd testinguser.

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

  • 重新安装 Cygwin SSHD 服务(我还删除了除 testinguser 之外的其他 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 服务运行正常,我可以启动和停止它而不会出现任何错误。

4

0 回答 0