Differences

This shows you the differences between the selected revisions of the page.

2020-06-24 2020-06-25
Taking into account that on Windows 10 1809 and higher, the firewall rule is created and enabled by default when openSSH is installed via Optional Features. Taking into account that the firewall rule binds to sshd.exe in its appropriate installation directory as opposed to blanked allowing any program to bind on TCP port 22. (212.186.228.178) simplifying the instructions (martin)
Line 23: Line 23:
  * Allow incoming connections to %%SSH%% server in Windows Firewall:   * Allow incoming connections to %%SSH%% server in Windows Firewall:
-    * On Windows 10 version 1809, Windows Server 2019 and newer +    * When installed as an optional feature, the firewall rule //"OpenSSH SSH Server (sshd)"// should have been created automatically. If not, proceed to create and enable the rule as follows. 
-      * Check if the firewall rule 'OpenSSH SSH Server (sshd)' has been created and enabled. If not, proceed to create and enable the rule as follows: + ···* Either run the following PowerShell command as the Administrator: \\ <code powershell>New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\System32\OpenSSH\sshd.exe"</code> Replace ''C:\System32\OpenSSH\sshd.exe'' with the actual path to the ''sshd.exe'' (''C:\Program Files\OpenSSH\ssh.exe'', had you followed the manual installation instructions above)
- ·····* Either run the following PowerShell command as the Administrator: \\ <code powershell>New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\System32\OpenSSH\sshd.exe"</code> + ···* or go to //Control Panel > System and Security > Windows Firewall//((//Windows Defender Firewall// on Windows 10.))// > Advanced Settings > Inbound Rules// and add a new rule for port 22. &wincp
-     * or go to //Control Panel &gt; System and Security &gt; Windows Firewall//((//Windows Defender Firewall// on Windows 10.))// > Advanced Settings &gt; Inbound Rules// and add a new rule for port 22. &amp;wincp +
-    * On earlier versions of Windows +
-      * Either run the following PowerShell command (Windows 8 and 2012 or newer only), &win8 &win2012 as the Administrator: \\ &lt;code powershell&gt;New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\Program Files\OpenSSH\sshd.exe"</code> +
- ·····* or go to //Control Panel > System and Security > Windows Firewall//((//Windows Defender Firewall// on Windows 10.))// > Advanced Settings > Inbound Rules// and add a new rule for port 22. &wincp+
  * Start the service and/or configure automatic start:   * Start the service and/or configure automatic start:
    * Go to //Control Panel > System and Security > Administrative Tools// and open //Services//. Locate //%%OpenSSH SSH Server%%// service. &wincp     * Go to //Control Panel > System and Security > Administrative Tools// and open //Services//. Locate //%%OpenSSH SSH Server%%// service. &wincp

Last modified: by martin