
Writing Your First Nmap NSE Script on Kali Linux
June 15, 2025
Tunneling Like a Boss: NordVPN Setup for Kali
June 16, 2025Windows to Ubuntu VPS: A Practical PSCP Guide for Copying Files & Folders
If you ever need to move files between your Windows workstation and an Ubuntu VPS, PSCP is the simplest tool in your toolbox. PSCP (PuTTY Secure Copy) comes bundled with Putty, and lets you securely upload and download files over SSH right from the Windows command prompt.
What You’ll Learn
- What PSCP is and when to use it
- How to install PSCP via the PuTTY installer
- Basic PSCP syntax for copying files and folders
- Examples: Windows → Ubuntu VPS and Ubuntu VPS → Windows
1. What Is PSCP?
PSCP (PuTTY Secure Copy) is a command-line utility used for securely transferring files between computers over an SSH connection. It’s a client for the Secure Copy Protocol (SCP), which relies on SSH for secure data transfer. PSCP is commonly used to copy files from a Windows machine to a Linux machine, or vice versa. Think of it as the Windows equivalent of the Unix scp command.
2. Installing PSCP via PuTTY
1. Go to the PuTTY download page.
2. Download the MSI installer (e.g. putty-version-installer.msi
).
3. Run the installer and ensure “PSCP” is selected under “Additional tools”.
4. (Optional but recommended) Add PuTTY’s install folder to your PATH: on Windows 10/11 go to Settings → System → About → Advanced system settings → Environment Variables → Path → Edit → New, then enter C:\Program Files\PuTTY
.
5. Open a new Command Prompt and type pscp
. If it’s on your PATH you’ll see usage help; otherwise you’ll need to cd
into C:\Program Files\PuTTY
or supply the full path ("C:\Program Files\PuTTY\pscp.exe"
).
3. PSCP Basic Syntax
The general form is:
pscp [options] <source> <destination>
Key options:
-P <port>
SSH port (default 22)-l <user>
SSH username-r
Recursively copy directories-pw <password>
Pass password on the command line (use with caution)
4. Copying Windows → Ubuntu VPS
Example: upload the local folder betheme
into your WordPress themes directory on the VPS.
pscp -r betheme root@mousebrothers.com:/srv/www/wordpress/wp-content/themes/
Breakdown:
-r
copy the entire directory treebetheme
local folder you want to copyroot@mousebrothers.com:
SSH user and host/srv/www/wordpress/wp-content/themes/
remote destination path
5. Copying Ubuntu VPS → Windows
To download a file from your server back to Windows:
pscp root@mousebrothers.com:/srv/www/wordpress/wp-content/themes/betheme/style.css C:\Users\YourName\Downloads\
Change the remote path and local folder as needed. For a full directory:
pscp -r root@mousebrothers.com:/srv/www/wordpress/wp-content/uploads C:\Backups\uploads
6. Tips & Troubleshooting
- If you’ve moved PuTTY/PSCP out of
C:\Program Files
, add its folder to yourPATH
. - Use public-key auth for password-free transfers (
-i <keyfile.ppk>
). - Wrap Windows paths in quotes if they contain spaces:
pscp "C:\My Documents\file.txt" user@host:/remote/path/
- For very large folders, add
-batch
to suppress prompts.
7. Wrap-Up
With PSCP in your toolkit, you can move files and folders between Windows and your Ubuntu VPS in seconds. Whether you’re deploying a theme, backing up uploads, or grabbing logs, it all happens securely over SSH and from the familiar Windows CLI.
Give it a spin, copy something small first, confirm it lands where you expect, then scale up to full directory transfers. Once you’ve got the hang of the syntax, PSCP will be your go-to for quick, reliable file syncs.
Ready for a reliable, high-performance VPS at an unbeatable price? We host our own Kali labs on Hostinger: 4 vCPU, NVMe storage, 16 GB RAM, and 16 TB bandwidth—backed by 24/7 support and a 30-day money-back guarantee. You’ll save up to 20% when you lock in a 24-month plan. Grab a Hostinger VPS using this referral link and support our content.
👉 Claim your Hostinger VPS (from only US$ 7.99/mo)