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 1 year has passed since last update.

Windowsにおいて、Microsoftがオプション機能として用意しているOpenSSHをインストールする際の備忘録

Posted at

Windows 10 Pro(など)で OpenSSH サーバを起動するための必要な手順に関する情報はQiitaにもすでに記事がありますが、Windowsで最も標準的と思われる、Microsoftがオプション機能として提供しているOpenSSHをセットアップする手順に関して、一次情報などの情報が分かりづらかったので主に自分向けのメモとして作成したものです。

動作確認した環境

  • Windows 10 Pro バージョン 10.0.19043 ビルド 19043

Micrsoftの関連記事一覧

手順の要約

  1. 「OpenSSHをインストールする」に記載の通り、Windowsの設定アプリ内の「アプリと機能」の設定を開き「オプション機能」を選択する。もしくは Windows メニューを開き、「オプション機能の管理」を検索すると同じ設定画面を開くことができる。
  2. 「オプション機能」の設定で、「OpenSSHサーバー」を追加する。
  3. OpenSSHサーバ、ssdh の設定ファイルは、参考文「サーバー構成」に記載の通り、 %PROGRAMDATA%\ssh\ 以下にある sshd_config になるので、これを編集する(管理者権限のExplorerや、PowerShellを使うと良い)※場所がわかりにくい。
    Authorized_Keysを用いたパスワードレスでのログインをしたい場合、し、以下の設定変更をすると良い。
    1. 以下の設定を有効にする
      AuthorizedKeysFile	.ssh/authorized_keys
      
    2. administorators グループに居るユーザでSSHログインをする場合は、デフォルトの sshd_config に含まれている以下の設定を無効にする(しないと、前項の設定が効かない)。殆どの場合、下記の設定は不要なので安心して消しましょう。
      #Match Group administrators
      #       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
      
    3. 必要に応じて、 %USERPROFILE%\.ssh\authorized_keys を用意する。
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?