Transferring Files Over SSH [Simple Ways in Detail]
If you regularly work with remote servers, virtual machines, or another computer connected through a network, you will eventually need a secure way to move files between devices. This is where SSH (Secure Shell) becomes extremely useful. SSH is a secure network protocol that allows you to connect to another computer safely while protecting your data through encryption.
One of the biggest advantages of SSH is that it supports secure file transfers without exposing your files to unauthorized users. Whether you need to upload website files, download logs from a server, or copy documents between Linux, macOS, and Windows computers, SSH provides several reliable methods to complete the task.
In this guide, you will learn three simple ways to transfer files over SSH.
Transferring Files Over SSH [3 Simple Ways in Detail]

Before you begin, make sure you have the following information ready.
- Your remote server’s IP address or hostname.
- Your SSH username.
- Your SSH password, or an SSH private key if your server uses key-based authentication.
- An active SSH service running on the remote computer.
Once these requirements are available, you can choose any of the methods below.
Method 1: Transfer Files Using SCP (Secure Copy Protocol)
Step 1: Open the Terminal or Command Prompt
The easiest way to transfer files through SSH is by using SCP, which stands for Secure Copy Protocol. SCP comes with most Linux and macOS systems and is also available in recent versions of Windows through OpenSSH.
On Windows, press Windows + S, search for Command Prompt or Windows Terminal, and open it.
On Linux or macOS, simply open the Terminal application.
The command window is where you will enter the file transfer commands. Although it may seem intimidating at first, you only need to type a few simple commands.
Step 2: Upload a File to the Remote Computer
Navigate to the folder containing your file if necessary. Then type an SCP command using this format:
scp filename.txt username@server_ip:/destination/folder
For example:
scp report.pdf john@192.168.1.100:/home/john/Documents
After pressing Enter, SCP will ask for your SSH password if password authentication is enabled.
Once authentication succeeds, the upload begins automatically. The progress is displayed directly in the terminal until the transfer is complete.
Step 3: Download a File from the Remote Computer
Downloading files works almost the same way. Reverse the command so that the remote file appears first.
For example:
scp john@192.168.1.100:/home/john/report.pdf C:\Users\John\Downloads
If you are using Linux or macOS, replace the destination with your preferred local folder.
After entering your password, SCP securely downloads the file to your computer.
SCP is an excellent choice for users who occasionally transfer individual files because it is fast, secure, and already included with most operating systems.
Method 2: Transfer Files Using SFTP
Step 1: Start an SFTP Session
Another method is SFTP, which stands for SSH File Transfer Protocol. Unlike SCP, SFTP provides an interactive environment where you can browse folders before transferring files.
Open your terminal and type:
sftp username@server_ip
For example:
sftp john@192.168.1.100
Press Enter and provide your password when prompted.
Once connected successfully, the terminal changes to an SFTP prompt, allowing you to work with files on the remote computer.
Step 2: Browse Local and Remote Directories
One advantage of SFTP is that you can navigate through folders before copying files.
Use the pwd command to display the current remote directory.
Use lpwd to display your current local directory.
If you need to change directories, use cd for the remote computer and lcd for your own computer.
Taking a moment to confirm both locations helps prevent files from being uploaded to the wrong folder.
Step 3: Upload and Download Files
Uploading a file is simple.
Type:
put filename.txt
The file is immediately transferred from your local computer to the current folder on the remote server.
To download a file, type:
get filename.txt
The selected file is copied securely from the server to your current local directory.
When you finish transferring files, type:
exit
or
bye
to close the SFTP connection.
SFTP is ideal for beginners because it lets you move around folders naturally before transferring files, making mistakes less likely.
Method 3: Transfer Files Using WinSCP
Step 1: Install and Launch WinSCP
If you prefer a graphical interface instead of typing commands, WinSCP is one of the easiest applications for transferring files over SSH on Windows.
Download and install the software from the official website.
Once installed, open WinSCP. You will immediately see the login screen where connection details are entered.
Many new users find this method much easier because everything is controlled using Windows and folders rather than commands.
Step 2: Connect to Your Remote Server
Choose SFTP or SCP as the file protocol.
Enter your Host Name, User Name, and Password.
Click Login.
If this is your first connection, WinSCP displays the server’s security fingerprint. Verify the information if possible, then accept it to continue.
After connecting, the program displays two separate file panels.
The left panel shows files on your local computer.
The right panel shows files stored on the remote server.
This layout makes file management very intuitive, even for someone with no previous SSH experience.
Step 3: Transfer Files Between Computers
To upload files, simply drag a file from the left panel to the desired folder on the right panel.
To download files, drag them from the right panel to a folder on the left panel.
WinSCP displays a progress window while the transfer is taking place. Once completed, your files immediately appear in the destination folder.
Because everything happens through a graphical interface, WinSCP is often recommended for beginners who are not comfortable using command-line tools.
FAQs
Is SSH required for SCP and SFTP?
Yes. Both SCP and SFTP use SSH to create a secure, encrypted connection before transferring files.
Which method is easiest for beginners?
Most beginners prefer WinSCP because it provides a familiar graphical interface. Those who want to learn command-line administration usually start with SFTP or SCP.
Can I transfer entire folders?
Yes. SCP allows recursive folder transfers using the -r option, while WinSCP and SFTP also support transferring complete directories.
Is SSH file transfer secure?
Yes. SSH encrypts your connection and data, making it much safer than traditional unencrypted file transfer methods.
Do Windows 11 and Windows 10 support SSH?
Yes. Modern versions of Windows 11 and Windows 10 include OpenSSH, allowing you to use SSH, SCP, and SFTP without installing additional command-line software in many cases.
Can I use SSH keys instead of passwords?
Yes. SSH keys provide stronger security than passwords and are commonly used on production servers and cloud environments.
