Skip to main content

Transfer Files Over SSH - scp, rsync, sshfs Guide

Thanks for sharing the detailed content from Linux Handbook! Here’s a concise summary of the key methods discussed for uploading and downloading files over SSH:


Summary: Upload Files to Remote System Over SSH
#

1. scp (Secure Copy) — Easy but Deprecated
#

  • Upload:

    scp filename username@ip:/home/username/
  • Download:

    scp username@ip:/home/username/filename .
  • Copy directories (add -r):

    scp -r dir username@ip:/home/username/

2. rsync — Reliable and Powerful
#

  • Upload:

    rsync filename username@ip:/home/username/
  • Download:

    rsync username@ip:/home/username/filename .
  • Directories (add -r):

    rsync -r dir username@ip:/home/username/

3. sshfs — Mount Remote Filesystem
#

  • Install:

    sudo apt install sshfs
  • Mount:

    mkdir mount_dir
    sshfs username@ip:/remote/path mount_dir
  • Unmount:

    umount mount_dir

4. GUI: FileZilla (SFTP Client)
#

  • Easy drag-and-drop interface.
  • Configure via File > Site Manager.
  • Enter SSH/SFTP details (IP, port, username, password).
  • Remote on right, local on left — transfer with drag-and-drop.

Youcef
Author
Youcef
My name is youcef and i’m linux user who fool in love with linux , like free and open software .