How to Install Secured Shell SSH on Windows

# Windows 10 & Server 2019

# Install the OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~

# Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~

# Windows 7 & Server 2008 R2

# Install Chocolatey
if (!(Get-Command choco.exe -ErrorAction SilentlyContinue)) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(''))}

# OpenSSH Server & Client
choco install openssh -y
$env:path += ";C:\Program Files\OpenSSH-Win64"

# Server extra command
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
# Test SSH Usage

PS C:\Windows\system32> ssh -o FingerprintHash=sha512 -p 8282
The authenticity of host '[]:8282 ([]:8282)' can't be established.
RSA key fingerprint is SHA512:+YMCA-YMCA-YMCAmiGaE1eWKK237gogogogogogo.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Leave a Reply

Your email address will not be published. Required fields are marked *