Windows OS

How to Connect to SFTP on Windows?

Sharing files between computers have been going on for years. In the early days, file transfer was done through mediums such as USBs, floppy disks, CDs, DVDs, etc. Over time, new file and data transfer methods have made this process a lot more seamless.

However, today we will be talking about a specific method of transferring files between computers over a network. It was developed quite a while ago, and today, the majority of people know how they can transfer files over a network using FTP or SFTP. This guide will be perfect for you for the people who do not know how they can do that.

FTP stands for “File Transfer Protocol”. When you have connected successfully to an FTP server, you can send your files to different PCs connected to your specific network. That said, FTP connections are not very secure; hence they were replaced by SFTP, whose “S” stands for “Secure”.

SFTP encrypts the server information and the data being transferred over it. Today, SFTP has completely taken over, and if there are people who still use FTP, they better switch over for their safety as tapping in an FTP server should be easy as hacking has become very advanced these days.

So, let’s dive right in and find out exactly how you can get an SFTP connection on your Windows computer.

Installing OpenSSH

The first thing you need to understand is that you need to have SSH in your system. For users with a Windows version below 10, you need to get SSH protocol to establish an SFTP connection. If you have Windows 10, you don’t need to get an SSH protocol as it is already built-in.

So, if you have an earlier version of Windows, follow these steps to get an SSH protocol.

  1. Download OpenSSH from Github.
  2. Once it is has been downloaded, extract the files in the “Program Files” folder usually present in “Local Disk C”.
  3. Use the “PowerShell” application as an administrator and type in the following command.
    $ cd "C:\Program Files\OpenSSH-Win64"
  4. Next, you need to install the “sshd” and “ssh-agent”. You can do this by executing the following command in PowerShell.
    $ powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1

    Once they are installed, you will receive the message that these two agents were successfully installed.

  5. You can start the service manually or configure it to start automatically using “Services.msc”. This should create a folder named “C:\ProgramData\ssh” and a host key.

Opening SSH Port in Windows Firewall.

After installing OpenSSH, let’s move towards the next step of opening the SSH port. Follow these steps to do exactly that.

Open “Windows Firewall” from the Control Panel. Next, click on the “Inbound Rules” option available in the left pane.

Click on “New Rule”, it should lead you to the window below.

Select “Port”; this should open “Protocol and Ports”. Specify “22” in the specific port option and click “Next”.

Choose “Allow the Connection” and click “Next”, select “Private” for the network option. Click on Finish.

Install and Configure SFTP Server on Windows

In this step, we will install a tool to run the SFTP server on and configure the settings for SFTP. We will use the “SolarWinds” tool to run SFTP. Follow these steps.

Download the “SolarWinds” tool using this link: SolarWinds. Once the download is complete, install the tool using the setup. After it has been installed, launch the tool. Choose the root directory and then click on “TCP/IP” settings.

In the following screen, specify the port “22” and choose the “Bind to all local IP addresses”.

Click on “Users” and then click on “New User” in the lower right region of the window. Proceed to write your username and password.

After specifying the username and password, move on to the next option of “Startup and System Tray”. Choose your desired options and click ok. SolarWinds has now been configured.

Next, open the “Windows Firewall” application. From there, go to the allowed applications option.

You should see this on your screen. Next, click on “Allow another app” and click on “Browse”. Search “SFTP.exe” and open it.

Check the SolarWindsSFTP server box.

With this, your SFTP server connection is cleared for take-off.

Install and Configure SFTP Client

After configuring the SFTP ports and firewall, you need to install a client to perform the file transfer operations. There are many SFTP clients available for Windows; we will go for the “WinCP” client. Follow these steps to install and configure an SFTP client.

Download WinCP client from this link WinCP. Once the download for the client is complete, run its setup to install it on your system. First, you will see the license screen. Click on “Accept” and move forward.

Next, select the type of installation you want to be done; we advise you to go for the recommended one and click on “Next”.

Now, select the interface style you want your client to appear in. After choosing the desired option, click on “Next”.

Afterwards, click on install to finish the installation of the client. After the process is completed, you should see this screen.

The SFTP server has already been configured; you can perform file transfer operations using the WinCP client.

Conclusion

With this, you are done with learning how to connect to an SFTP server on Windows. You need to make sure that you make the necessary SSH settings if you have a Windows version below 10. After configuring SSH, you can follow the other two steps as it is to transfer files from one computer to the other using SFTP.

SFTP is a powerful tool that can be used in running small businesses. We hope that we can help you out in setting up SFTP.

About the author

Zeeman Memon

Hi there! I'm a Software Engineer who loves to write about tech. You can reach out to me on LinkedIn.