In this tutorial, we will show you how to set up a SFTP server in Windows. If you have a cloud computer with V2 Cloud and you’re looking to setup a secure FTP server in your cloud computer instead, follow this link. The main difference between FTP and SFTP is the security aspect. Running applications that use SFTP for file transfers is the answer to protecting that data in transit.
This tutorial will provide the steps required to set up an SFTP Server using Windows Server 2019’s OpenSSH Server feature. Our SFTP client computer will be a Windows 10 computer, and we will be using Filezilla as the client application to connect to the server.
You can browse the different sections of this tutorial. This is what you need to setup a SFTP server in Windows:
- Configure the SFTP server feature (OpenSSH Server) in Windows Server 2019
- Create the root SFTP directory
- Create the user account that will be used for file transfers
- Install and configure the SFTP client for data transfers
- Perform an SFTP transfer between client and server
Note: the terms “directory” and “file folder” refer to the same object. They are used interoperably in this tutorial.
Section 1: Configure the SFTP server feature (OpenSSH Server) in Windows Server 2019
Login to your server. Then type apps and features in the search bar. Under Apps and Features (the section in the middle of the page), click Manage optional features.
Scroll among the options, find OpenSSH Server, click it, then click Install.
The installation will now begin in the background. We are going to make some changes to the Windows Services to allow for the newly installed OpenSSH server to be started automatically.
Type services in the search bar. Then click the Services Desktop app. Locate the OpenSSH SSH Server option from the list. Right-click it, then select Properties.
Change the Startup type to Automatic. Click Start afterward.
Once the service has started the Service status: will change from Stopped to Running. Click OK to proceed.
Locate the OpenSSH Authentication Agent service. Right-click it, then select Properties.
Repeat Steps 3 to 5 where you will make the same changes as you did with the OpenSSH SSH Server with this service (OpenSSH Authentication Agent).
When done, you’ll notice the status of the two services is now set to Running.
Browse to the following folder, C:\\ProgramData\\ssh in the address bar. You may have to type the location as the ProgramData folder is normally hidden by default. Click the “drop-down arrow” beside Text documents then select All Files. Select sshd_config from the files list, then click Open.
When the sshd_config file opens, click Ctrl+F on your keyboard to launch the Find app. Type “root”, then click Find Next. We are looking for the entry #ChrootDirectory.
Edit the entry to this ChrootDirectory C:\\SFTPRoot. This is the location where our SFTP files will be stored from the server side. Click File then click Save.
Let’s now create the actual folder/root directory we just referenced as our location to save SFTP files.
Section 2: Create the root SFTP directory
Browse to the C:\\ drive on your server. Right-click in any empty space then select New from the drop-down menu then click Folder. Name the folder SFTPRoot. Ensure that it is exactly the same as the folder name referenced in the path in Step 10.
Now let us add the user account on this server that will be used to do the SFTP transfers.
Section 3: Create the user account that will be used for file transfers
Open the Server Manager, then select Tools and click Computer Management.
Click the drop-down arrow beside Local Users and Groups. Click the Users folder. In the middle pane, right-click on any white space and select New User from the drop-down menu.
Create the user account by entering your username and password. Record these credentials as we will be using them for our SFTP transfers. Uncheck the option User must change password at next logon and check the options User cannot change password and Password never expires. Click Create once finished.
Now let us find and record the IP address of our SFTP server. This will be needed along with the username and password we just created for our SFTP connection.
Type cmd at the search bar. Select Command Prompt. Type ipconfig at the prompt then hit the Enter key on your keyboard.
The Ip address of our server is 192.168.50.4.
Our server-side configuration is now complete. We now need to configure our client computer to connect to this newly configured SFTP server and transfer data to it.
Section 4: Install and configure the SFTP client for data transfers
In this example, we will be using Filezilla as our SFTP client. To continue, download the Filezilla client application and install it on your computer. Let’s now create our SFTP site.
Launch the Filezilla app. Click the File option from the menu bar then click Site Manager.
Select the My Sites folder under the left section under Select entry: Then click the New site button.
Name the site, we’ll call it SFTP-Site1. On the General tab in the left section of the Site Manager window, configure the following; Protocol: SFTP – SSH File Transfer Protocol, Host:
192.168.50.4, Port: 22, Logon Type: Normal, User: the User/username that will be used to connect to the SFTP site/server, Password: password for the user. When done click Connect.
Save the password and click OK. Click OK at the Unknown host key pop-up box. Note, you can check the checkbox Always trust the host, add this key to the cache.
Once connected successfully the following will be what you’ll see.
We’ll now proceed to create and configure the remote SFTP directory.
Right-click in any white space in the bottom-right-hand quadrant of the Filezilla GUI window. Then select Create Directory. This will create a file folder in the root SFTP folder on the SFTP server.
Create a name for the new directory, then click OK.
You’ll now see that our newly created directory has been created successfully on our client computer.
If we browse to the SFTPRoot folder on the SFTP server, we’ll see that our directory has been automatically created.
Now that our two sites have been configured. Let’s move on to the final step to perform a secure file transfer.
Select the “source file folder”, from the top left-hand file folder listing with the label Local site: that has the file/files that you want to transfer to your server. Our folder is C:\Users\Kurwin\Downloads\. On the Remote site: select your destination file folder. Locate your file under the bottom-left hand file listings then right-click it and select Upload.
You’ll now see that your file has been transferred successfully.
SFTP server verifies our successful transfer. We see our file in our target directory within our root directory.
That’s it. We have now successfully set up a SFTP server in a Windows environment.
There is a better way to do IT with V2 Cloud
By using V2 Cloud, you get access to a fully-integrated virtual desktop solution, without the traditional complexity of other cloud providers.
There is an easier way to enable secure remote access to employees without sacrificing end-user experience and performance.
V2 Cloud offers a cloud desktop infrastructure with
- No hidden fees
- No complicated setup
- No contracts
- Flat-rate pricing model
We're the #1 virtualization solution for small businesses. Create virtual desktops, servers, and applications to improve productivity and significantly reduce your IT costs.
Learn more about V2 Cloud and our cloud VDI solution. Get started with a risk-free 7-day trial, and experience the simplicity, scalability and power of V2 Cloud.