0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Windows Permission denied (publickey,keyboard-interactive).

Posted at

OpenSSHのログを表示して原因を探る

OpenSSHのサービスを動かしている場合は停止する

net stop sshd

次にOpenSSHをデバッグモードで実行する

C:\Windows\System32\OpenSSH\sshd -d

これでログが表示されるので、原因を探る。

自分の場合の原因

自分の場合以下のような怪しいエラーがでていた。

Could not open authorized keys '__PROGRAMDATA__/ssh/administrators_authorized_keys': No such file or directory

~/.ssh/authorized_keysを読み取ってほしいのに、なんで管理者の方を読み取ろうとしてるんだ?っていう話になりまして、
そこでいろいろ調べて、sshd_configの一番下の2行をコメントアウトしたら解決できました。

# Match Group administrators
#       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?