Enabling SSH on Windows Server has historically required third-party tools or complex configuration. Windows Server 2025 streamlines the process, making it easier than ever to set up secure remote command-line access. In this post I’ll walk you through enabling and configuring the built-in SSH server, adjusting firewall rules, and managing user access.
Enable the Built-in SSH Server
- Open Server Manager on your Windows Server 2025 machine.
- Select the Local Server node from the left-hand menu.
- Look for the new entry labeled Remote SSH Access.
- Click on the blue text (which says “Disabled” by default) next to Remote SSH Access.
- A script will run to enable the SSH server. When prompted, type yes to allow the script to execute and complete the setup.
The script will also display important information about firewall settings and which user accounts can connect via SSH.
Configure Windows Firewall for SSH
- Open Windows Defender Firewall with Advanced Security.
- Go to Inbound Rules.
- Find the rule named OpenSSH SSH Server.
- Right-click and choose Properties.
- On the Advanced tab, ensure that the rule is enabled for both Domain and Private profiles.
By default, the rule is only enabled for networks tagged as private, which is typical for domain-joined servers
Grant User Access to SSH
- When the SSH server is enabled, a local group called OpenSSH Users is created.
- Open Computer Management and navigate to Local Users and Groups > Groups.
- Double-click the OpenSSH Users group.
- Add the user accounts you want to allow SSH access.
You can add individual users or, for easier management across multiple servers, add a domain group to the local OpenSSH Users group.
Connect Using an SSH Client
- From another computer, you need an SSH client. On Windows, you can use the built-in client or install the Microsoft OpenSSH client via the Windows Package Manager (winget).
- To initiate a connection, use the following syntax in a terminal or PowerShell window:
ssh DOMAIN\username@server_name
Replace DOMAIN with your domain name, username with your user account, and server_name with the name of the Windows Server you enabled SSH on.
- The first time you connect, you’ll see a prompt about the server’s key fingerprint. Type yes to continue.
- Enter your password when prompted.
- You should now have a remote SSH session into your Windows Server 2025 machine.
You can further configure the SSH server, such as specifying which shell is used or enabling key-based authentication. For more advanced configuration, consult the following docs article on Learn: OpenSSH Server configuration for Windows Server and Windows