Transfer Files to Windows Server With SFTP

For big files and many files, SFTP is faster and more reliable than copying through Remote Desktop. Windows Server 2025 already includes an SFTP server (OpenSSH); you only need to switch it on. Then you can use FileZilla, WinSCP or the sftp command, with the same user name and password as for Remote Desktop.


1. Switch On the SSH Server

Connect with Remote Desktop and open PowerShell as administrator: right-click Start and choose Terminal (Admin). Run:

Start-Service sshd
Set-Service -Name sshd -StartupType Automatic
Set-NetFirewallRule -Name OpenSSH-Server-In-TCP -Profile Any

The first command starts the server, the second starts it after every restart. The third is needed: the firewall rule that comes with Windows allows SSH only on a private network, but the network of your server counts as public, so without it port 22 stays closed (1).

Check it: sshd must be Running and Automatic, and the rule OpenSSH SSH Server (sshd) must show True and Any (2).

PowerShell: the SSH server running and its firewall rule for any network

Windows Server 2022

On Windows Server 2022, install the SSH server first with Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0, then run the commands above.

2. Connect

In your SFTP program use:

ProtocolSFTP
Hostyour server's IP address
Port22
User nameAdministrator
Passwordyour Windows password (the Credentials tab in the Client Area, or your own if you changed it)

The first time, the program shows the server's key and asks whether you trust it: accept it. You start in C:\Users\Administrator. The other drives are folders such as /C:/ and /D:/.

In a terminal on Linux or macOS:

sftp Administrator@YOUR.SERVER.IP

How to use FileZilla is shown in Download files from server via FTP – FileZilla; choose SFTP as the protocol.

3. Protect It

Like Remote Desktop, SSH is open to the whole internet and bots try passwords on it. Use a strong password, and if you can, allow only your own addresses (replace the addresses with yours):

Set-NetFirewallRule -Name OpenSSH-Server-In-TCP -RemoteAddress 203.0.113.10,198.51.100.0/24

When you no longer need SFTP, switch it off again:

Stop-Service sshd
Set-Service -Name sshd -StartupType Manual

Related Guides

View all Windows guides

Was this answer helpful? 0 Users Found This Useful (0 Votes)