How to Transfer Files to Your Server with SCP and SFTP

Transferring Files to Your Server

Two common protocols for moving files to and from your server: SCP and SFTP.

SCP (Secure Copy Protocol)

SCP transfers files over SSH directly from the command line.

Upload a file to the server:

scp /local/path/file.zip root@YOUR_SERVER_IP:/remote/path/

Download a file from the server:

scp root@YOUR_SERVER_IP:/remote/path/file.zip /local/path/

Upload an entire directory (recursive):

scp -r /local/folder/ root@YOUR_SERVER_IP:/remote/path/

Using a non-default SSH port:

scp -P 2222 file.zip root@YOUR_SERVER_IP:/remote/path/

SFTP (SSH File Transfer Protocol)

SFTP is an interactive file transfer session over SSH.

sftp root@YOUR_SERVER_IP
sftp> put file.zip           # Upload
sftp> get remotefile.zip     # Download
sftp> ls                     # List remote files
sftp> lcd /local/dir         # Change local directory
sftp> exit

GUI Option: FileZilla

  1. Download and install FileZilla
  2. Open File → Site Manager → New Site
  3. Protocol: SFTP
  4. Host: your server IP, Port: 22
  5. Logon Type: Normal, Username: root, Password: your password
  6. Click Connect

GUI Option: WinSCP (Windows)

Download WinSCP, create a new session with SFTP protocol, enter your server IP and credentials, and connect. WinSCP provides a dual-pane interface (local left, remote right) for drag-and-drop transfers.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Welcome to Your Dedicated Server

Congratulations on Your New Dedicated Server! This article will help you get oriented and ready...

How to Connect to Your Server via SSH

Connecting to Your Server via SSH SSH (Secure Shell) is the primary method for accessing and...

First-Time Server Setup Checklist

First-Time Server Setup Checklist Complete these steps after first logging into your server to...

Understanding Linux vs Windows Server: Which OS Should You Choose?

Linux vs Windows Server: Which Should You Choose? Choosing an operating system is one of the...

Understanding Your Server Specifications

Understanding Your Server Specifications This guide explains what each hardware spec means so you...