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:
- Visit the OpenSSH website at https://www.openssh.com/.
- Download the latest version of OpenSSH for Windows.
- 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:
- Press the Windows key + R to open the Run dialog box.
- Type "services.msc" and click OK.
- Scroll down and find the "OpenSSH SSH Server" service.
- Right-click on the service and select Properties.
- In the Properties window, set the Startup type to Automatic.
- Click the Start button to start the service.
- Close the Services window.
Step 3: Configure Firewall
To allow OpenSSH SFTP Server to work properly, you need to configure firewall settings as follows:
- Go to the Control Panel.
- Click on "Windows Defender Firewall".
- Click on "Allow an App or feature through Windows Defender Firewall".
- Click on "Change Settings".
- Find and select "OpenSSH SSH Server".
- Click on "Allow Access".
- Click OK to save the settings.
Step 4: Configure SFTP Access
To configure SFTP access, follow these steps:
- Open the OpenSSH configuration file using your preferred text editor. The file is located at C:\ProgramData\ssh\sshd_config.
- Uncomment the line containing "Subsystem sftp /bin/sftp-server".
- Change the line to "Subsystem sftp internal-sftp".
- Scroll down and add the following lines:
Match Group sftpusers
ChrootDirectory %h
ForceCommand internal-sftp
- 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:
- Open the Command Prompt as an administrator.
- Enter the following command to create a new group:
net localgroup sftpusers /add
- Enter the following command to create a new user:
net user [username] [password] /add /comment:"SFTP User Account" /home:"C:\SFTP\ [username]"
- 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!