How to Download, Install, and Configure OpenSSH for Windows
Download
To get started with OpenSSH for Windows, select the appropriate file from the list on the right. Choose the version that matches your system’s architecture:
- ARM: For ARM-based Windows devices
- ARM64: For 64-bit ARM architecture
- Win32: For 32-bit Windows systems
- Win64: For 64-bit Windows systems
Download the corresponding installer (.msi) or zip file for your platform. Symbol files are also available for debugging purposes if needed.
Install
For MSI Installers:
- Run the downloaded .msi file.
- Follow the on-screen instructions in the installation wizard.
- The default installation location is usually
C:\Program Files\OpenSSH
, but you can choose a different path if desired. - After installation, OpenSSH server and client tools will be available on your system.
For Zip Files:
- Download the zip file for your platform.
- Extract the contents to your preferred location, such as
C:\OpenSSH
. - Add the OpenSSH binaries to your system’s PATH environment variable to make the command-line tools accessible.
Configure
Server Configuration:
- Go to the OpenSSH installation directory.
- Locate the
sshd_config
file. This file allows you to customize settings such as:- Permitted users
- Authentication methods (password or key-based)
- Port and address configurations
- Edit the configuration file with a text editor to meet your security requirements.
- Save the changes and restart the OpenSSH server service.
Client Configuration:
OpenSSH client tools, including ssh
and scp
, are included. Use these tools to securely connect to remote systems. For example, use the ssh
command to connect to a remote server.
Verify Installation
After installation, verify that OpenSSH is properly installed by checking the version information through the command line.
OpenSSH for Windows 8.6p1
A new major update to OpenSSH for Windows (thanks to the @PowerShell team).
It comes with OpenSSH 8.6p1 and LibreSSL 3.3.3
You can download OpenSSH for Windows through the buttons below or via the binaries at the bottom of this release.
OpenSSH for Windows x64 | OpenSSH for Windows x86 |
---|---|
Hope you enjoy OpenSSH for Windows!
© 2020 — 2021, Lumito — www.lumito.net
OpenSSH for Windows 8.6p1-beta1
Whoah! OpenSSH for Windows 8.6p1-beta1 is now available for download. It (only) comes with OpenSSH 8.6p1 and some minor bugfixes.
NOTE: This is a beta release. That means that it may not be stable because it is under development.
You can download OpenSSH for Windows through the buttons below or via the binaries at the bottom of this release.
OpenSSH for Windows x64 | OpenSSH for Windows x86 |
---|---|
Hope you enjoy OpenSSH for Windows!
© 2020 — 2021, Lumito — www.lumito.net
OpenSSH for Windows 8.2p1
OpenSSH for Windows is a native port of OpenSSH to Windows. Here, in this repo, I’ve created an installer to make it easier to obtain and configure the binaries.
What’s new in version 8.2p1?
- OpenSSH version 8.2p1
- LibreSSL version 3.0.2
- Choose if you want to register SSHD and SSH-AGENT services
- Project rebranded to OpenSSH-for-Windows (before was OpenSSHforWindows-Installer)
- Other minor improvements
You can download OpenSSH for Windows through the buttons below or via the binaries at the bottom of this release.
OpenSSH for Windows x64 | OpenSSH for Windows x86 |
---|---|
Hope you enjoy OpenSSH for Windows!
© 2020 — 2021, Lumito — www.lumito.net
Released version 8.1
First release of OpenSSH for Windows — Installer!
It comes with this features:
- A setup wizard for x64 and x86 systems
- A modern OpenSSH version for a Windows OS
- Fully tested with various Windows 10 systems
- An old setup available by downloading the source code
You can download OpenSSH for Windows — Installer through the buttons below or via the binaries at the bottom of this release.
OpenSSH for Windows x64 | OpenSSH for Windows x86 |
---|---|
Hope you enjoy OpenSSH for Windows — Installer 8.1!
© 2020, Lumito — www.lumito.net
- OpenSSH for Windows allows you to securely access remote computers with Windows-native tools using the command line interface.
- To install OpenSSH Client and Server on Windows, go to Settings > System > Optional features > View features, search for “OpenSSH“, and continue to install the components.
Windows users normally use the Remote Desktop Protocol to access other Windows devices remotely. As RDP offers a remote graphical user interface (GUI), it is a convenient method for remote access. However, it offers limited functionality, especially if you are a sysadmin. For that purpose, some people prefer to use the Secure Socket Shell (SSH) protocol.
SSH provides a command-line interface to remote computers and servers, and therefore, a more granular control over them. Previously, we used third-party apps like “PuTTY” and “MobaXterm” to develop an SSH connection with the remote devices. However, Microsoft has made a Windows-native SSH client available which can be used instead.
OpenSSH for Windows is a Feature on Demand (FoD) add-on for the Windows operating system. This means that although it is free, it is not installed by default, and needs to be installed manually. If you install it, you can use the SSH protocol through the native command line to access and control the remote computers, provided that your user account has the required privileges.
This guide will show you how to install and use OpenSSH for Windows. These will work on both Windows 11 and Windows 10 (version 1809 and above). Using this guide, you can install both OpenSSH Client and OpenSSH Server in a few easy steps.
Table of Contents
What is OpenSSH
The Secure Socket Shell, or Secure Shell is a networking protocol that allows a remote connection with another device securely. SSH uses a client-server model to communicate with remote computers and ensures data integrity through encryption. It uses multiple layers of the OSI reference model to make sure that the communicated data between the devices is secure.
Originally, OpenSSH was a tool used for remote connection with other devices which comes preinstalled in Linux-based operating systems. Since it is an open-source utility, it has been modified for other platforms, including Windows.
Microsoft has now made “OpenSSH for Windows” available that you can install with a small update package.
Before installing OpenSSH, your system needs to meet a few requirements.
Requirements for OpenSSH for Windows
Before proceeding to install either OpenSSH Client or Server, you must make sure that your PC satisfies the prerequisites, which are:
- OS should be Windows 10 version 1809 or later.
- The PowerShell version should be 5.1 or above
- The user account must be a member of the Administrators group.
To check the OS version, run the following command in the Run Command box:
WinVer
To check the PowerShell version, run the following command in PowerShell:
$PSVersionTable.PSVersion
To check if your user is a member of the Administrators group, run the following command in PowerShell. If it returns “True“, it means that you are a member of the Administrator group.
(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
Once you have made sure that your PC satisfies these requirements, you may continue to install OpenSSH Client, OpenSSH Server, or both.
Install OpenSSH on Windows
Implement the following steps to install OpenSSH on your Windows computer to access it remotely. Optionally, you can also install “OpenSSH Server” to access this device from another PC using the SSH protocol.
-
Press the Windows key + i to open the Settings app.
-
Click System.
-
Go to “Optional Features“.
Open the optional features settings page -
Click “View features“.
View optional features -
Search for “OpenSSH“.
-
Select “OpenSSH Client” and optionally, “OpenSSH Server“, and then click Next.
Select OpenSSH Client and Server -
Click Install.
Install OpenSSH Client and Server on Windows
After performing these steps, OpenSSH Client (and Server) will be installed on your computer.
Note: These features can take some time to install.
Alternative to the steps above, you can also run the following command in an elevated PowerShell instance to install OpenSSH for Windows:
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
This command will install both OpenSSH Client and OpenSSH Server.
Using OpenSSH Client for Windows
Once OpenSSH Client for Windows has been installed, you can begin using it to connect with remote PCs on the network. Of course, OpenSSH has to be configured on the remote PC first, the method for which has been given below in this post.
First, confirm that it has been installed successfully by running the following command in Command Prompt:
ssh
Once confirmed, you can access a remote PC on the network which has SSH configured using this command:
ssh [Username]@[ServerName]
Note: You may be asked for user credentials if connecting for the first time.
Note that the command above will try to connect to the remote device using the default port, which is 22. If you want to use a different port, then you will need to use this command instead:
ssh [Username]@[ServerName] -p [PortNumber]
Configuring OpenSSH Server for Windows
If you have installed the OpenSSH Server on your Windows PC, you will need to configure it before you can connect to this PC using the SSH protocol.
Configuring the OpenSSH server can be a bit thicker. You need to make sure that it is allowed through the firewall and the proper ports. Therefore, it involves a few steps. Here is what you need to do:
-
First, run the following command in an elevated PowerShell to run the “sshd” service automatically.
Set-Service -Name sshd -StartupType 'Automatic'
-
Now start the service with this command:
Start-Service sshd
-
Now use the following command to ensure that the SSH server is running and waiting for the connections on port 22:
netstat -na| find ":22"
-
Now ensure that the Windows Defender Firewall allows inbound connections to Windows through the TCP port 22 with this command:
Get-NetFirewallRule -Name *OpenSSH-Server* |select Name, DisplayName, Description, Enabled
Confirm rules for SSH server connection -
[Conditional] If you find that the rule is missing or disabled, run the following command to create a new inbound rule:
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
-
To change the default rules for the SSH connection, run the following command in PowerShell which will open the respective OpenSSH file in Notepad:
start-process notepad C:\Programdata\ssh\sshd_config
-
Make the necessary changes in the file to manage the permissions, and then save the file using the CTRL + S shortcut keys.
Here are a few examples of the rules:
- Deny domain user:
DenyUsers itt\administrator@192.168.10.10
- Allow a domain group:
AllowGroups itt\sshadmins
- Allow local groups:
AllowGroups Administrators
Manage SSH permissions - Deny domain user:
-
After making the changes, run the following command in PowerShell:
restart-service sshd
After performing the steps above, you should be able to connect to this PC using the SSH protocol. For that purpose, use the command ssh [Username]@[ServerName]
as discussed above.
Conclusion
With SSH, you do not need to perform a long string of operations to perform a simple task. Instead, you can access it with Windows-native OpenSSH and continue to manage the remote PC using commands. This makes OpenSSH for Windows an excellent utility for network and system administrators.
Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!
Learn More
Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You’ll have a chance to have your questions answered in a live Ask Me Anything format.
Learn More
Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don’t miss this opportunity to engage with our team and contribute to the future of Chocolatey!
Learn More
Webinar from
Wednesday, 17 January 2024
We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we’ll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!
Watch On-Demand
Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.
Watch The Replays
Webinar Replay from
Wednesday, 30 March 2022
At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!
Watch On-Demand
Livestream from
Thursday, 9 June 2022
Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.
Watch On-Demand
Livestream from
Thursday, 04 August 2022
Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We’ll talk about some cool new features, long term asks from Customers and Community and how you can get involved!
Watch On-Demand
Livestreams from
October 2022
For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.
Watch On-Demand
About OpenSSH for Windows¶
OpenSSH is a very popular suite of network utilities based on the SSH protocol (Secure Shell). Finding an installation tool for Windows is not very easy, since almost all Windows versions are portable. Update: Now with OpenSSH v8.6p1 and LibreSSL v3.3.3
An that is what OpenSSH for Windows does: installs a modern version of OpenSSH into your Windows system.
Downloads¶
Latest OpenSSH version: 8.6p1¶
You can download the latest version of OpenSSH for Windows by clicking on the button with your Windows architecture (modern PCs use x64).
OpenSSH for Windows x64 | OpenSSH for Windows x86 |
---|---|
All OpenSSH for Windows downloads are available through this link.
Compilation instructions¶
GitHub Actions | AppVeyor | Azure Pipelines | Travis CI | Codacy |
---|---|---|---|---|
———- | ———- | ———- | ———- |
Requirements¶
- Inno Setup 6
- MSVC or MinGW with gcc and g++ support
Compilation steps¶
-
Download or
git clone
the repository. -
Open Developer Command Prompt (if you use MSVC) or Command Prompt if you use MinGW.
-
Go to the ISCompiler folder at the directory in which you have extracted the files.
-
Now run:
cl ISCompil.cpp
if you are using MSVC.g++ ISCompil.cpp -o ISCompil.exe
if you are using MinGW.
-
After compiling
ISCompil.cpp
, runISCompil.exe
-
Finally, check
..\{WINDOWS ARCHITECTURE}
folder forOpenSSHforWindows-Installer-{WINDOWS ARCHITECTURE}.exe
-
Done! Now you can install OpenSSH for Windows correctly.
Uninstallation instructions¶
You can uninstall OpenSSH for Windows through Programs and Features in Control Panel.
Additional notes¶
OpenSSH for Windows’ binaries sources are available here.
Contributing to the project¶
If you want to contribute to the project, please open a Pull Request.
You can contribute with the following things:
- A new portable version of OpenSSH
- Code improvements
Please report bugs through the Issues tab.
Acknowledgements¶
I would like to thank OpenBSD, OpenSSH, PowerShell and Inno Setup for making this project possible, and you for choosing my software!
Copyrights¶
© 1996 — 2021, the OpenBSD project
© 1999 — 2021, the OpenSSH project
© 2006 — 2021, PowerShell and Microsoft Corporation
© 1997 — 2021, Jordan Russell’s Software
© 2020 — 2021, Lumito — www.lumito.net
Last update: 2021-05-12