Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Transfer files using SCP (secure copy command)

Update 08/31/2026

This guide explains how to securely transfer files between your computer and the server of your web hosting using the SCP (secure copy command) protocol.

 

Introduction

  • To function, the SCP command requires:
    1. a source: a file/folder to transfer
    2. a destination: the address of the FTP server to perform the transfer
  • Data is automatically encrypted by SCP during the transfer.

 

Copy a local file to the server

Prerequisites

  • To obtain the FTP server address:
    1. Click here to access the management of your hosting on the Infomaniak Manager (need help?).
    2. Click directly on the name assigned to the hosting in question.
    3. Click on FTP / SSH in the left-hand menu:
    4. The host server address is displayed in the upper left corner and can be copied:
  • To obtain the path to the destination folder:
    1. Click here to access the management of your hosting on the Infomaniak Manager (need help?).
    2. Click directly on the name assigned to the hosting in question.
    3. Click on More information (in the Information section).
    4. Copy the absolute path:
    5. Complete the absolute path with the desired destination folder.

 

Next, to copy a file from your computer, the command is structured as follows:

scp localmachine/path_to_the_file username@ftp_server_adress:/path_to_remote_directory

 

To copy an entire directory from your computer, you need to adapt the command as follows:

scp -r localmachine/path_to_the_file username@ftp_server_adress:/path_to_remote_directory

The entire folder will be transferred to your server.

 

To copy the entire contents of a directory from your computer, you need to adapt the command as follows:

scp -r localmachine/path_to_the_file/* username@ftp_server_adress:/path_to_remote_directory

Has this FAQ been helpful?