How to change the OpenSSH server port in Windows

The installation for OpenSSH server in Windows is quite straightforward, as all we need to do is to follow the instructions here.

However, it took a while for me to figure out how to change the listening port. Especially, in the installation folder, there is a sshd_config_default file. Changing this does not make any difference. OpenSSH-InstallFolder

After digging through the documentation, I finally found that in Windows, sshd reads configuration data from %programdata%\ssh\sshd_config .

So that is where the config file is located.

OpenSSH-SSHD-Config

Changing the port is easy, all we need to do is to edit the line that specifies the port, and restart the sshd service.

OpenSSH-SSHD-Config-Port.JPG

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s