How to Install OpenSSH SFTP server on Windows 10
If you need to transfer files securely between a Windows machine and a remote server or other Windows device, then you should consider installing the OpenSSH SFTP server on your Windows computer. The following tutorial will guide you through the process of installing and configuring the OpenSSH SFTP server on your Windows 10 machine.
Pre-requisites
- A Windows 10 machine with administrative privileges
- An internet connection
- A text editor such as Notepad++
Steps
1. Download the OpenSSH installation package
The first thing you need to do is download the OpenSSH installation package from the official website. You can download the package using the following link: https://github.com/PowerShell/Win32-OpenSSH/releases/
2. Unzip the package
Once you have downloaded the ZIP file, you need to extract the contents of the ZIP file to a folder on your computer.
3. Install OpenSSH
Open a PowerShell window with administrative privileges and navigate to the folder where you unzipped the OpenSSH package.
Run the following command to initiate the installation process:
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Press Enter.
After the installation is successful, run the following command to verify that the installation has completed successfully:
ssh -V
You should see the version of OpenSSH that you installed listed in the output.
4. Configure OpenSSH
The next step is to configure OpenSSH on your Windows 10 machine.
Open the
sshd_configfile located in theC:\ProgramData\sshfolder.Uncomment the following lines by removing the
#symbol at the beginning of each line:#Subsystem sftp /usr/libexec/sftp-server Subsystem sftp internal-sftpAdd the following lines to the bottom of the
sshd_configfile:Match User your-username ForceCommand internal-sftp ChrootDirectory %h X11Forwarding no AllowTcpForwarding noNote: Replace
your-usernamewith your actual Windows username.Save the changes made to the
sshd_configfile.
5. Restart OpenSSH service
To apply the changes made to the sshd_config file, you must restart the OpenSSH service. Open a PowerShell window with administrative privileges and run the following command:
Restart-Service sshd
6. Connect to the OpenSSH SFTP server
You can connect to the OpenSSH SFTP server using an SFTP client such as FileZilla or WinSCP. Use the following settings to connect:
- Server: Your Windows 10 IP address
- Port: 22
- Username: Your Windows 10 username
- Password: Your Windows 10 password
Conclusion
OpenSSH SFTP server is an excellent choice for secure file transfer between Windows machines. By following the above steps, you should now have a working OpenSSH SFTP server running on your Windows 10 machine.