0
0

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 5 years have passed since last update.

cygwinでSSHサーバを立てようとした時につまづいたメモ

Posted at

こちらを参考に、cygwinでSSHサーバを立てようとしたがケアレスミスが多すぎなので反省のためにメモ。
http://osksn2.hep.sci.osaka-u.ac.jp/~naga/miscellaneous/winssh/winssha-4.html

パスワードを許可しない設定

今回は秘密鍵で認証しようとしてたので、パスワード認証を許可しない設定が必要だった。
こちらを参考にした。
https://sites.google.com/site/himazu/ssh-on-cygwin

# PasswordAuthentication yes
→
PasswordAuthentication no
# ChallengeResponseAuthentication yes
→
ChallengeResponseAuthentication no

権限を間違えていた。

公開鍵を作成して配置した後、権限を600にするのを忘れていた。
.ssh ディレクトリの権限は700。

authorized_keys の書き間違え

これが一番アホくさい。反省のため書いておく。
以下の点が特に注意。

  • スペルに間違いないか authorized_keys が正しい。
  • 書き込んだ内容に間違いがないか
    • catで書き込んでいる時、違うファイルを使って書き込んでしまった。
  • 実行コマンドの制限を付けようとして誤って編集した。
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?