Skip to content

Instantly share code, notes, and snippets.

@1206yaya
Created February 17, 2026 22:32
Show Gist options
  • Select an option

  • Save 1206yaya/4bd8b3df277075bfa6e383419b0f3150 to your computer and use it in GitHub Desktop.

Select an option

Save 1206yaya/4bd8b3df277075bfa6e383419b0f3150 to your computer and use it in GitHub Desktop.
win setting
1. OpenSSH サーバーのインストール
設定アプリから行う方法:
設定 → システム → オプション機能(Windows 10の場合は「アプリ」→「オプション機能」)を開く
「オプション機能を追加する」(または「機能を追加」)をクリック
一覧から 「OpenSSH サーバー」 を探してインストール
PowerShell(管理者)から行う方法:
powershellAdd-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
2. SSHサービスの起動と自動起動設定
PowerShellを管理者として開き、以下を実行します。
powershell# サービスを起動
Start-Service sshd
# PC起動時に自動で立ち上がるようにする
Set-Service -Name sshd -StartupType Automatic
3. ファイアウォールの確認
通常、OpenSSHサーバーのインストール時にポート22の受信規則が自動で追加されます。もし接続できない場合は、手動で許可します。
powershellNew-NetFirewallRule -Name "OpenSSH-Server" -DisplayName "OpenSSH Server (sshd)" `
-Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment