How to Install OpenSSH SFTP Server on Windows 11

In this tutorial, we'll be walking you through how to install OpenSSH SFTP server on your Windows 11 computer.

Step 1: Download and Install OpenSSH

To install OpenSSH on your Windows 11 computer, follow the steps below:

  1. Visit the OpenSSH website at https://www.openssh.com/.
  2. Download the latest version of OpenSSH for Windows.
  3. Once the file has been downloaded, run the installer and follow the instructions to install OpenSSH on your computer.

Step 2: Configure OpenSSH SFTP Server

Once OpenSSH is installed on your computer, you need to configure your SFTP server. Here are the steps to follow:

  1. Press the Windows key + R to open the Run dialog box.
  2. Type "services.msc" and click OK.
  3. Scroll down and find the "OpenSSH SSH Server" service.
  4. Right-click on the service and select Properties.
  5. In the Properties window, set the Startup type to Automatic.
  6. Click the Start button to start the service.
  7. Close the Services window.

Step 3: Configure Firewall

To allow OpenSSH SFTP Server to work properly, you need to configure firewall settings as follows:

  1. Go to the Control Panel.
  2. Click on "Windows Defender Firewall".
  3. Click on "Allow an App or feature through Windows Defender Firewall".
  4. Click on "Change Settings".
  5. Find and select "OpenSSH SSH Server".
  6. Click on "Allow Access".
  7. Click OK to save the settings.

Step 4: Configure SFTP Access

To configure SFTP access, follow these steps:

  1. Open the OpenSSH configuration file using your preferred text editor. The file is located at C:\ProgramData\ssh\sshd_config.
  2. Uncomment the line containing "Subsystem sftp /bin/sftp-server".
  3. Change the line to "Subsystem sftp internal-sftp".
  4. Scroll down and add the following lines:
Match Group sftpusers
ChrootDirectory %h
ForceCommand internal-sftp
  1. Save and close the file.

Step 5: Create SFTP User Accounts

Once you've configured your OpenSSH SFTP server, you can create user accounts to access it. Follow these steps:

  1. Open the Command Prompt as an administrator.
  2. Enter the following command to create a new group:
net localgroup sftpusers /add
  1. Enter the following command to create a new user:
net user [username] [password] /add /comment:"SFTP User Account" /home:"C:\SFTP\ [username]"
  1. Enter the following command to add the user to the sftpusers group:
net localgroup sftpusers [username] /add

Step 6: Test Your OpenSSH SFTP Server

Once you have created your user accounts, you can test your OpenSSH SFTP server by connecting to it using an SFTP client. You should be able to connect to the server using the SFTP protocol and upload or download files to and from the server.

And that's it! You've successfully installed OpenSSH SFTP server and configured it to work with Windows 11.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!