Open a new terminal
Only for Linux users:
eval `ssh-agent`
ssh-add ~/.ssh/pilm103_rsa
Type the password you gave during registration
A good way to interact with remote storage is to mount the server as a folder in your computer. For that we need the sshfs
command (See requirements to know how to install it).
mkdir -p ~/mnts/mit
sshfs mit:. ~/mnts/mit -o delay_connect -o follow_symlinks
Now you should be able to see your space:
ls ~/mnts/mit
To unmount (disconnect from the server):
Don't do it now, we'll disconnect at the end.
umount ~/mnts/mit
This is the best tool to use to transfer files. The main advantages:
The basic command is:
rsync [options] origin target
Normally origin
or target
is a local folder or a remote computer.
Download the following file:
cd ~/Downloads
mkdir work && cd work
curl -L https://github.com/nf-core/test-datasets/raw/smrnaseq/testdata/sample_1.fastq.gz -o sample.fastq.gz
cd ..
In this case, we will copy from our local computer to the MIT storage cluster.
rsync -avn work/sample.fastq.gz mit:~/pilm103
Options explained:
Alternatives:
rsync -avn work mit:~/pilm103
rsync -avn work/ mit:~/pilm103
If what we see makes sense, then we repeat it without the -n
option. We can add -P
to see the progress of the transfer.
rsync -avP work mit:~/pilm103
Move to the terminal where you did the first connection to the server and check if you see the file now in your home directory.
Check if you see the file in the folder you mounted the server: ls ~/mnts/mit/pilm103