Since 2016 · 50,000+ customers · ★ 5.0 on Google Live chatWhatsAppTelegramOpen a ticket
Get started
Linux

How to Transfer Files from a Linux Server to Windows over SSH

How to transfer files from a Linux server to Windows using SSH by 99RDP

If you can log in to a Linux server with SSH, you can also copy files between it and your Windows PC securely, without setting up FTP. Windows 10 and 11 include the OpenSSH client, so scp and sftp work straight from PowerShell, and graphical tools such as WinSCP and FileZilla make drag-and-drop transfers easy. This guide covers every common method, how to use SSH keys and custom ports, and how to transfer large folders reliably.

Quick answerOpen PowerShell on Windows and run:

scp user@203.0.113.10:/var/www/backup.tar.gz C:\Users\you\Downloads\

Reverse the two arguments to upload from Windows to the server. Add -P 2222 if SSH uses a different port, and -r to copy a folder.

Diagram of downloading a file from a Linux server to Windows with scp in PowerShell
scp from PowerShell

Method 1: scp in PowerShell or Command Prompt

Windows 10 (version 1809 and later) and Windows 11 have the OpenSSH client installed by default. Check with:

scp

If it is missing, add it in Settings → System → Optional features → OpenSSH Client.

Download a file from the server:

scp user@203.0.113.10:/home/user/report.pdf .

Download a whole folder:

scp -r user@203.0.113.10:/var/www/site C:\Backups\site

Upload a file from Windows to the server:

scp C:\Users\you\Desktop\index.html user@203.0.113.10:/var/www/site/

With a custom SSH port (note the capital P for scp):

scp -P 2222 user@203.0.113.10:/home/user/data.zip .

Quote paths that contain spaces, for example "C:\Users\you\My Files\".

Method 2: sftp (interactive)

sftp user@203.0.113.10

Once connected, use these commands:

ls                 # list remote files
cd /var/www        # change remote folder
lcd C:\Downloads   # change local folder
get backup.tar.gz  # download
get -r site        # download a folder
put notes.txt      # upload
bye                # exit

sftp is handy when you want to browse before choosing what to transfer. For a custom port, use sftp -P 2222 user@host.

Ways to copy files from a Linux server to Windows: scp, sftp, WinSCP, FileZilla
Ways to copy files

Method 3: WinSCP (graphical)

  1. Download and install WinSCP from its official website.
  2. In the login dialog, choose SFTP as the protocol, enter the host name, port (22 unless changed), user name and password.
  3. For key-based login, click Advanced → SSH → Authentication and select your private key (WinSCP converts OpenSSH keys to its .ppk format if needed).
  4. Click Login. Your PC is on the left and the server on the right; drag files between them.

WinSCP can also keep a local and remote folder synchronized and edit remote files directly.

Method 4: FileZilla

In FileZilla Client, open File → Site Manager, create a new site with protocol SFTP - SSH File Transfer Protocol, enter the host, port and user, and choose Normal (password) or Key file as the logon type. Then connect and drag files between the panes.

Method 5: rsync for large or repeated transfers

rsync only transfers what has changed and can resume interrupted transfers, which makes it ideal for big folders and regular backups. On Windows, run it inside WSL (Windows Subsystem for Linux):

rsync -avz --progress user@203.0.113.10:/var/www/site/ /mnt/c/Backups/site/

Inside WSL, your Windows drives appear under /mnt/c, /mnt/d and so on.

Steps to use an SSH key from Windows: ssh-keygen, copy the public key to the server, connect without a password
Use an SSH key

Use SSH keys instead of passwords

Keys are more secure and let you transfer without typing a password each time. In PowerShell:

ssh-keygen -t ed25519
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh user@203.0.113.10 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

After that, ssh, scp and sftp use the key automatically. You can also save the server in C:\Users\you\.ssh\config:

Host myserver
    HostName 203.0.113.10
    User deploy
    Port 2222

Then simply run scp myserver:/path/file ..

Tips for large transfers

  • Compress folders on the server first: tar -czf site.tar.gz /var/www/site. One large file transfers faster than thousands of small ones.
  • Use rsync or WinSCP's resume feature on unreliable connections.
  • Check the transfer with a checksum: sha256sum file on Linux and Get-FileHash file in PowerShell.

Troubleshooting

  • "Permission denied": check the user name and password or key, and that the user can read the file on the server.
  • "Connection refused" or timeout: check the SSH port and that your IP is allowed through the server's firewall.
  • "No such file or directory": check the remote path; it is case-sensitive on Linux.

Frequently asked questions

How do I copy a file from Linux to Windows using the command line?

In PowerShell, run scp user@server:/path/to/file C:\destination\. Windows 10 and 11 include scp.

What is the easiest way to transfer files from Linux to Windows?

WinSCP or FileZilla over SFTP: connect with your SSH details and drag files across.

Is SCP secure?

Yes. scp and sftp encrypt both your login and the data using SSH.

Can I use FTP instead?

Plain FTP sends passwords unencrypted. If the server already has SSH, SFTP is simpler and safer.

Nishant Kumar, Sr. Server Engineer at 99RDP
Written byNishant KumarSr. Server Engineer, 99RDP. Part of the team that runs our servers and answers support.
Keep reading

More Linux guides

All Linux guides

Need a server for this?

✓ Setup in minutes✓ Full admin access✓ 7-day refund on new services