「設定 - SSHの有効化(Windows)」の版間の差分

ナビゲーションに移動 検索に移動
51行目: 51行目:
#: <code>Set-Service -Name sshd -StartupType 'Automatic'</code>
#: <code>Set-Service -Name sshd -StartupType 'Automatic'</code>
#: <br>
#: <br>
# ファイアウォールルールが設定されていることを確認する。
# ファイアウォールルールを設定する。
  <syntaxhighlight lang="powershell">
  <syntaxhighlight lang="powershell">
  if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled))
  if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled))

案内メニュー