Knowledge base

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

Transfer files via SCP (secure copy command)

Update 04/14/2026

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

 

Preamble

  • To work, the SCP command requires:
    1. a source: a file/folder to transfer
    2. a destination: FTP server address to perform the transfer
  • The data is automatically encrypted by SCP at the time of transfer.

 

Copy a local file to the server

Prerequisites

  • To get 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 concerned.
    3. Click on FTP / SSH in the left sidebar:
    4. The host server address is displayed at the top left and can be copied:
  • To get the destination folder path:
    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 concerned.
    3. Click on More information (in the Information section).
    4. Copy the absolute path:
    5. Complete the absolute path with the desired destination folder.

 

Then, to copy a file from your machine, the command is as follows:

scp localmachine/path_to_the_file username@ftp_server_adress:/path_to_remote_directory

 

To copy an entire directory from your machine, 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 contents of an entire directory from your machine, 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?