cygwin上的公钥认证问题

Nav*_*een 8 ssh cygwin localhost public-key

我一直在cygwin上尝试"ssh localhost"(我使用的是WIndows 7),但它一直要求输入密码.

当我做"ssh -vvv localhost"时,我发现公钥认证没有发生(或失败).因此,它要求输入密码.

debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/xxxxxxxx/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Run Code Online (Sandbox Code Playgroud)

我不确定它是否无法读取authorized_keys文件,或者是否存在超时问题,或者验证失败了?有没有办法获得更多细节?

我已完成以下步骤:

  • SSH-主机配置.对所有人回答是.
  • 生成RSA密钥并将其添加到authorized_keys文件中.
  • net start sshd
  • ssh localhost

这些是权限:

-rw------- 1 xxxxxxxx mkgroup  402 May 18 16:34 authorized_keys
-rw------- 1 xxxxxxxx mkgroup 1675 May 18 16:33 id_rsa
-rw-r--r-- 1 xxxxxxxx mkgroup  402 May 18 16:33 id_rsa.pub
-rw-r--r-- 1 xxxxxxxx mkgroup  171 May 18 14:33 known_hosts
Run Code Online (Sandbox Code Playgroud)

还有一些问题: - 该组显示为mkgroup. - 我想,本地主机中不存在用户"xxxxxxxx".它没有显示在"net user sshd"中."xxxxxxxx"是域帐户.这会导致公钥身份验证问题吗?

只是为了查看输出是否有任何差异,我删除了authorized_keys文件并尝试了.输出没有差异.它仍然发送数据包并继续进行下一种身份验证模式.没有错误消息.有没有其他方法可以获得更多细节(我是Cygwin和SSH n00b)?我想在读取authorized_keys文件时发现它失败了.

小智 0

至少你需要

chmod 700 id_rsa
Run Code Online (Sandbox Code Playgroud)

这是 我的设置 如果有帮助的话

-rwx------ 1 史蒂文 无 1675 年 5 月 17 日 12:49 id_rsa
-rwx------ 1 史蒂文 无 399 五月 17 12:49 id_rsa.pub
-rwx------ 1 史蒂文 无 803 五月 18 01:13known_hosts