13,009
回編集
(→方法 2) |
|||
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)) |