How to Install OpenSSH on Windows Server

Resumo rápido

No PowerShell como admin execute 2 comandos

Add-WindowsCapability -Online -Name OpenSSH.Server
Get-Service -Name sshd | Set-Service -StartupType Automatic

Detalhado

Using Windows PowerShell

Abra o PowerShell como administrador

Cole o seguinte comando para instalar o serviço OpenSSH

Add-WindowsCapability -Online -Name OpenSSH.Server

Output:

Path          :
Online        : True
RestartNeeded : False

Configure para o serviço iniciar com o Windows, de forma automática

Get-Service -Name sshd | Set-Service -StartupType Automatic

Configure Firewall

Now, click Inbound Rules in the open Firewall window. Then, select New Rule from the right pane.

In the New Inbound Rule Wizard, select Port from the list of options, then click Next. Select ‘TCP’, then enter port 22 in the Specific local ports: section.

Next, allow the connection, assign the rule to server profiles, and set a custom name for easy identification from the list of Firewall rules.

Click Finish to save the new firewall rule.

Atualizado

Isto foi útil?