How to setup sftp server on windows server 2019

Last Updated: Feb 14, 2024 by

In today’s digital age, secure file transfer is a crucial aspect of any business. Whether you are transferring sensitive financial data or confidential client information, it is essential to have a secure and reliable method of file transfer. This is where setting up an SFTP server on your Windows Server 2019 comes into play.

In this article, we will guide you through the process of setting up an SFTP server on your Windows Server 2019, ensuring secure file transfer and server security.

What is SFTP?

SFTP stands for Secure File Transfer Protocol, and it is a secure version of the File Transfer Protocol (FTP). SFTP uses a secure channel to transfer files between a client and a server, providing encryption and authentication to ensure the security of the data being transferred.

Why Use SFTP?

SFTP offers several advantages over traditional FTP, making it the preferred method of file transfer for many businesses. Some of the key benefits of using SFTP include:

  • Secure file transfer: As mentioned earlier, SFTP uses encryption and authentication to ensure the security of the data being transferred, making it a more secure option than traditional FTP.
  • Platform independence: SFTP is platform-independent, meaning it can be used on any operating system, making it a versatile option for businesses with a diverse range of systems.
  • Firewall friendly: SFTP uses a single port (port 22) for both data and control, making it easier to configure and more firewall-friendly than traditional FTP.

Setting Up an SFTP Server on Windows Server 2019

Now that we understand the benefits of using SFTP, let’s dive into the process of setting up an SFTP server on your Windows Server 2019.

Step 1: Install OpenSSH Server

The first step is to install the OpenSSH server on your Windows Server 2019. To do this, follow these steps:

  1. Open the Server Manager and click on Manage in the top right corner.
  2. Select Add Roles and Features from the drop-down menu.
  3. Click Next on the Before you begin screen.
  4. Select Role-based or feature-based installation and click Next.
  5. Select your server from the server pool and click Next.
  6. Scroll down and select OpenSSH Server under Features.
  7. Click Next and then Install to begin the installation process.

Step 2: Configure the Firewall

Once the installation is complete, you will need to configure the firewall to allow SFTP connections. To do this, follow these steps:

  1. Open the Server Manager and click on Tools in the top right corner.
  2. Select Windows Firewall with Advanced Security from the drop-down menu.
  3. Click on Inbound Rules in the left-hand menu.
  4. Click on New Rule in the right-hand menu.
  5. Select Port and click Next.
  6. Select TCP and enter 22 as the specific local port.
  7. Click Next and then Allow the connection.
  8. Select Domain, Private, and Public and click Next.
  9. Enter a name for the rule (e.g. SFTP) and click Finish.

Step 3: Configure the SFTP Server

Now that the OpenSSH server is installed and the firewall is configured, it’s time to configure the SFTP server. To do this, follow these steps:

  1. Open the Server Manager and click on Tools in the top right corner.
  2. Select Services from the drop-down menu.
  3. Scroll down and find OpenSSH SSH Server in the list of services.
  4. Right-click on the service and select Properties.
  5. Change the Startup type to Automatic and click Start to start the service.
  6. Click Apply and then OK to save the changes.

Step 4: Create SFTP Users

The next step is to create SFTP users who will have access to the server. To do this, follow these steps:

  1. Open the Server Manager and click on Tools in the top right corner.
  2. Select Computer Management from the drop-down menu.
  3. Expand Local Users and Groups and click on Users.
  4. Right-click on an empty space and select New User.
  5. Enter a username and password for the new user and click Create.
  6. Right-click on the new user and select Properties.
  7. Click on the Member Of tab and click Add.
  8. Enter Administrators in the Enter the object names to select field and click Check Names.
  9. Click OK to add the user to the Administrators group.

Step 5: Configure SFTP Permissions

The final step is to configure the permissions for the SFTP server. To do this, follow these steps:

  1. Open the Server Manager and click on Tools in the top right corner.
  2. Select Computer Management from the drop-down menu.
  3. Expand System Tools and click on Local Users and Groups.
  4. Click on Groups and double-click on Administrators.
  5. Click on the Members tab and click Add.
  6. Enter the usernames of the SFTP users you created in Step 4 and click Check Names.
  7. Click OK to add the users to the Administrators group.

Conclusion

Setting up an SFTP server on your Windows Server 2019 is a relatively straightforward process that can provide your business with a secure and reliable method of file transfer. By following the steps outlined in this article, you can ensure the security of your data and improve your server’s overall security.

Gulrukh Ch

About the Author: Gulrukh Ch

Gulrukh Chaudhary, an accomplished digital marketer and technology writer with a passion for exploring the frontiers of innovation. Armed with a Master's degree in Information Technology, Gulrukh seamlessly blends her technical prowess with her creative flair, resulting in captivating insights into the world of emerging technologies. Discover more about her on her LinkedIn profile.

Leave a Reply

Your email address will not be published. Required fields are marked *