Posted On November 19, 2020

How to Install Secured Shell SSH on Windows

kimconnect 0 comments
blog.KimConnect.com >> Codes >> How to Install Secured Shell SSH on Windows
# Windows 10 & Server 2019

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

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

# 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('https://chocolatey.org/install.ps1'))}

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

# 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 sftp.kimconnect.com -p 8282
The authenticity of host '[sftp.kimconnect.com]:8282 ([55.55.55.55]: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 *

Related Post

PowerShell: Rebooting a List of Computers

Recommended Method to Process a List of Computers: $computernames='web01','web02','web03' restart-computer -computername $computernames -force -wait Get-WmiObject…

Microsoft SQL AlwaysOn High Availability Cluster Management Tool

There are some bugs in the script. I'm too lazy to go back a fix…

PowerShell: Install Windows Exporter

Simple Version $windowsExporterUrl='https://github.com/prometheus-community/windows_exporter/releases/download/v0.20.0/windows_exporter-0.20.0-amd64.msi' $stageFolder='C:\Temp\' # Download the file Import-Module BitsTransfer $fileName=[regex]::match($windowsExporterUrl,'[^/\\&\?]+\.\w{3,4}(?=([\?&].*$|$))') $msiFile=join-path $stageFolder $fileName if(!(test-path…
Other project: DragonCoin.com