Situatie
Solutie
To install a Windows SFTP server, you need to download OpenSSH and open the corresponding SSH port so that the SFTP server and client can communicate with each other.
Step 1: Install OpenSSH
Download the latest version of OpenSSH. This can be done from GitHub. Once you’ve downloaded the latest version, right-click to open PowerShell and select Run as administrator. Then go to the OpenSSH folder:
Use the command dir
to list the files in the directory.
Step 2: Activate SSHD and the SSH agent
Both the SSH daemon and the SSH agent can be installed with a command.
Once they have been successfully installed, you can close the PowerShell. You can manually start the SSH daemon or choose to have it activated with every restart. In Services.msc, you can set it up so that the SSH daemon automatically starts on boot.
Step 3: Open an SSH port
SSH uses port 22 as its standard port. Since Windows doesn’t typically come with SSH preinstalled, this port is normally closed. You can manually open it using Windows Firewall. Open Windows Defender Firewall and select New Rule under Inbound Rules.
In the next window, select Port and click on Next.
Select the TCP protocol and set “22” as a port.
In the next window, keep the connection selected and tick the box next to Private under Profile.
You can also add a name for the new rule. In our example, we’ve used the name “OpenSSH”. You can also add a description. Once you’re done, you can close the port settings by clicking Finish.
Step 4: Create SFTP connection
To connect to the SFTP server, you will need an SFTP client. Our example uses FileZilla, but you can also use WinSCP or Swish. One advantage of Swish is that it’s directly available in Windows Explorer. To configure the SFTP client, you need to enter the following information:
- Connection type (SFTP)
- IP address/Hostname
- Username
- Password
- Port (usually 22)
Once you’re done, you can connect to the SFTP server. In our example, this is on the left-hand side of your local computer. On the right, you’ll see the folder structure of the server.
Step 5: Upload files to the Windows SFTP server
Upload a file to the SFTP server by moving it to the file folder on the right-hand side or by right-clicking and selecting Upload.
Leave A Comment?