Skip to content

Transfert de fichiers

You can transfer files to your CIRRELT/GERAD account with ssh. Here's a few.

NOTES

Tu use scp or rsync, you need the proper access to the remote machine. Also, since the transfer is going through ssh, you need an ssh key as described in the ssh document.

Graphical applications

Programs that have a graphical user interface to do the file transfers.

(https://mobaxterm.mobatek.net/)

Windows only

In addition to allow you to make interactive ssh connections, MobaXterm offers the possibility to transfer files. To transfer files from your computer and your account, you can click on the sftp tab in the main window. In the sftp windows, you can navigate local and remote directories et drag files from one to the other.

https://cyberduck.io/

Windows and MacOS

File transfers only.

https://winscp.net/eng/index.php

Windows only

File transfers only

https://filezilla-project.org/

Windows, MacOs and Linux

File transfers only.

Command line

These are commands you can use from a terminal to copy files from one machine to another. They are usually used on Linux or MacOS machines.

The scp program (secure copy) can be used to transfer files between computers through a secure network (ssh).

Basic scp syntax:

    scp [options] [source] [destination]

Here are the most used scp options:

  • -r: to copy diretories recursively
  • -p: to preserve permissions
  • -v: show more details while transfering.

Here's a few examples of using scp

  • copy a file from your personal machine to your CIRRELT/GERAD account:

    scp program.py user@ssh.gerad.ca:/destination_directory
    scp program.py user@ssh.cirrelt.ca:/destination_directory
    
  • Copy a file from your CIRRELT/GERAD account to a directory on your personnal machine:

    scp user@ssh.gerad.ca:project1/program.py /destination_directory
    scp user@ssh.cirrelt.ca:project1/program.py /destination_directory
    
  • Copy a directory from your personal machine to your CIRRELT/GERAD account:

    scp -r directory user@ssh.gerad.ca:/destination_directory
    scp -r directory user@ssh.cirrelt.ca:/destination_directory
    
  • Copy a directory from your CIRRELT/GERAD account to a directory on your personnal machine :

    scp -r user@ssh.gerad.ca:project1 /destination_directory
    scp -r user@ssh.cirrelt.ca:project1 /destination_directory
    

The rsync program can copy files like scp but it tries to be smarter and only copy files that changed. This is why it's often used to synchronize directories between 2 computers since it won't copy everything.

  • From your personal computer to your CIRRELT/GERAD account:

    rsync -avz projet1 user@ssh.gerad.ca:/home/user
    
  • From your CIRRELT/GERAD account to your computer:

    rsync -avz user@ssh.gerad.ca:/home/user/projet1 /home/user