User Transfering Files

From Begrid Wiki
Jump to navigationJump to search

Introduction

This page explains different solutions to transfer files between your personal laptop and a remote Linux machine.

Using scp (Linux)

With the command line

From your laptop to a remote machine

The command scp is based on SSH. The syntax to transfer a file from your laptop to a remove machine is the following :

scp <path_of_the_local_file_to_copy> <your_login>@<remote_machine_name>:<path_of_the_file_on_the_remote_machine>

An example :

scp /home/mdupont/report.pdf mdupont@ui.begrid.be:/users/mdupont/

In this example, the file /home/mdupont/report.pdf on your laptop will be copied into the directory /users/mudpont on the remote machine /users/mdupont.

If you need to copy a directory, then you have to add option '-r' like this :

scp -r <path_of_the_local_directory_to_copy> <your_login>@<remote_machine_name>:<path_of_the_file_on_the_remove_machine>

From a remote machine to your laptop

Let's say you want to retrieve a copy of a file which is on a remote machine, you can proceed like this :

scp <your_login>@<remote_machine_name>:<path_of_the_file_on_the_remote_machine> <destination_of_the_copied_file>


With PuTTY (Windows)

If you have installed the PuTTY software suite on your Windows laptop, then you can use the pscp command as explained here.

With FileZilla (Windows and Linux)

If you prefer graphical interface over command-lines, than FileZilla is made for you !

First you have to download the application from the FileZilla website and install it.

After you have launched the FileZilla application, at the top of main FileZilla window, you should see this :

Image(connection_parameters.png)

Fill in these fields like this :

  • Host : the name of the remote machine
  • Username : your login
  • Password : your password
  • Port : the port number for SSH, normally it's 22

Once you've done with the fields, you can click on the "Quickconnect" button. After a few seconds, you should see the content of your personal directory on the remote machine appearing on the right window pane. You can now move your files or directories using the drag-and-drop method.

If you're using key-based authentication and you don't use an SSH-agent, then you should read this page explaining how to upload your key private key into FileZilla.

Using B2DROP

B2DROP is a solution from the EUDAT service catalogue. It is a secure and trusted data exchange service for researchers and scientists to keep their research data synchronized and up-to-date and to exchange with other researchers. You will find more explanations on this page. It is as easy to use as well-known cloud storage solutions like Dropbox or Google Drive, except that it has been designed for scientists and researchers.

This page will tell you how to create your B2DROP account and how to install the client on your laptop.

Mount your B2DROP folder using wdfs

Pre-requisites : wdfs must be installed on the remote machine (ask your local sysadmins !)

To mount your B2DROP storage on the Linux remote machine, follow these steps :

  1. Login to the Linux machine
  2. Create the mount point :
mkdir b2d
  1. Mount your B2DROP folder on the previously created mount point :
wdfs https://b2drop.eudat.eu/remote.php/webdav/ b2d
  1. Provide your login and password when asked
  2. Check that it works :
ls -al b2d/

Your B2DROP folder will remain mounted even if you log off. If you want to unmount it :

fusermount -u b2d

Troubleshoot

If you've got the following message when you issue the wdfs command :

fuse: failed to exec fusermount: Permission denied

it means that you don't have the right to use the command fusermount. Kindly ask your local sysadmin to give you this right like this :

chmod o+rx /bin/fusermount


Template:TracNotice