---
title: 'How to raise OpenSSH on Windows 2012 | Zomro'
description: 'For those looking for a way to implement OpenSSH in a Windows environment, this article provides a simple guide to installing and configuring OpenSSH on Windows Server 20'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/01_UmKqWdp.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * How to get OpenSSH up on Windows 2012 



# How to get OpenSSH up on Windows 2012

28-08-2023

For those looking for a way to implement OpenSSH in a Windows environment, this article provides a simple guide to installing and configuring OpenSSH on Windows Server 2012 R2.

## **1\. Downloading the OpenSSH distribution**

Go to [the official OpenSSH release page](https://github.com/PowerShell/Win32-OpenSSH/releases) and download the latest version of the distribution. At the time of this writing, the current version is v9.2.2.0p1-Beta For this example, I downloaded `OpenSSH-Win64.zip`.

![How to get OpenSSH up on Windows 2012 - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/01_UmKqWdp.png)

## **2\. Unpack and install the OpenSSH distribution**

Create a directory `C:\Program Files\OpenSSH` and unzip the contents of the downloaded archive into it.

![How to get OpenSSH up on Windows 2012 - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/02_jViBdjQ.png)

Run Powershell as administrator and run the following commands:
    
    
     cd "\Program Files\OpenSSH" .\install-sshd.ps1 

![How to get OpenSSH up on Windows 2012 - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/03_EE6bzAU.png)

If you encounter a security policy error, try performing the installation using this command:
    
    
     powershell -ExecutionPolicy Bypass -File .\install-sshd.ps1 

### **3\. Key generation**
    
    
     .\ssh-keygen.exe -A 

If you try to generate keys with the `.\ssh-keygen.exe -A` command, an error may occur. To fix it, go to `C:\ProgramData` and create the "ssh" directory. After that, run the command again to generate the keys.

![How to get OpenSSH up on Windows 2012 - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/04_iqgbxJ6.png)

![How to get OpenSSH up on Windows 2012 - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/05_IIGk6cK.png)

### **4\. Configuring Access Rights**

To properly configure file access, run the following command:
    
    
     PowerShell -ExecutionPolicy Bypass -File .\FixHostFilePermissions.ps1 

Respond to each request with "A".

![How to get OpenSSH up on Windows 2012 - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/06_YugKLOa.png)

### **5\. Configuring the Firewall**

OpenSSH runs on TCP port 22 by default. To allow access, add a rule to Windows Firewall using the following command:
    
    
     New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH

![How to get OpenSSH up on Windows 2012 - 7](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/07_2fdB4Ln.png)

Alternatively, you can do this through the GUI using the "Windows Firewall with Advanced Security" tool.

### **6\. Start the OpenSSH service**

Go to the list of services by selecting `services.msc` and look for "OpenSSH SSH Server". Set this service to start automatically and run it.

![How to get OpenSSH up on Windows 2012 - 8](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/08_cZKcyT9.png)

![How to get OpenSSH up on Windows 2012 - 9](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/09_0rhXG3x.png)

![How to get OpenSSH up on Windows 2012 - 10](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/10_99kIsCf.png)

### **7\. Verification of work**

To verify that port 22 is active, perform:
    
    
     netstat -a | findstr "22"

If the port is listening, it means that the installation was successful.

![How to get OpenSSH up on Windows 2012 - 11](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/28/11_CRxT85r.png)

### **8\. Checking OpenSSH**

Now that the service is running, you can verify that it is working. Connect to the server using the following command:
    
    
     ssh <username>@<your_server_ip>

If the connection is successful, it means that OpenSSH is installed and configured correctly.

In conclusion, OpenSSH – is a powerful tool to securely access remote servers. With it, you can easily and securely manage servers without worrying about the security of the data being transmitted.

We also suggest you other useful articles:

  * [How to raise OpenSSH on Windows 2019](https://zomro.com/blog/faq/406-how-to-raise-openssh-on-windows-2019)
  * [How to raise OpenSSH on Windows 2016](https://zomro.com/blog/faq/405-how-to-raise-openssh-on-windows-2016)
  * [How to get OpenSSH up on Windows 2012](https://zomro.com/blog/faq/399-kak-podnyat-openssh-na-windows-2012)
  * [Connecting to the VPS server via SSH using a key](https://zomro.com/blog/faq/235-podkljuchenie-k-serveru-cherez-ssh-po-kljuchu-s-nestandartnym-portom)



Similar articles:

[How to create a Telegram bot for monitoring remote hosts](https://zomro.com/blog/faq/316-kak-sozdat-telegram-bota-dlja-monitoringa-udalennyh-hostov) [Disable UDP for RDP connections to Windows Server](https://zomro.com/blog/faq/429-dissable-udp-for-rdp-on-windows) [Performing site and database backups with a script](https://zomro.com/blog/faq/353-performing-site-and-database-backups-with-a-script) [Why you need to disable UDP for RDP connections to Windows Server](https://zomro.com/blog/faq/427-otklyuchenie-udp-dlya-rdp-podklyuchenij-k-windows-server) [Performing backups of MySQL databases with rotation](https://zomro.com/blog/faq/355-performing-backups-of-mysql-databases-with-rotation)

[ Dedicated servers from €88.80/mon ](/dedicated-servers)
