

Test & Result: ssh -i ~/.ssh/id_rsa -i ~/. New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force How to Install and Configure OpenSSH on Windows Now let’s take a look at how our Support Engineers install OpenSSH on Windows Server. $systemRule = New-Object ("SYSTEM","FullControl","Allow") $administratorsRule = New-Object ("Administrators","FullControl","Allow") $acl.SetAccessRuleProtection($true, $false) $acl = Get-Acl C:\ProgramData\ssh\administrators_authorized_keys Paste the key you copied into this file "C:\ProgramData\ssh\administrators_authorized_keys" # Adjustment of the permissions for administrators_authorized_keys - file # Allow access Windows using RSA keys in the sshd_config file:ĭon’t forget to restart the sshd service after saving changes in sshd_config.Ĭopy the contents of the file (~/.ssh/id_rsa.pub) to clipboard. OpenSSH is a complete implementation of the SSH protocol (version 2) for secure remote login, command execution and file transfer. On the serverside (Windows Server 2012 R2):Įdit "C:\ProgramData\ssh\ sshd_config" # Uncomment this line:ĪuthorizedKeysFile _PROGRAMDATA_/ssh/administrators_authorized_keys New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 Powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1 Installation (serverside): # Installation via Choco
