2023-01-26
Session
-> SSH
Remote Host
: cedar.computecanada.caSpecify username
then add yoursssh cedar.computecanada.ca
ssh YOUR_USERNAME@cedar.computecanada.ca
YOUR_USERNAME
with your username, in my case: karencgs
pwd # after you log in, should be /home/username/
whoami # username
echo "$SCRATCH"
echo "$HOME"
ls $HOME/projects/
$HOME
: Store scripts, software files, things you use frequently without necessarily modifying them$SCRATCH
: Use to run scripts, submit jobs (scripts that take too long or use a lot of resources)/projects/
: Use as medium to long term storage (raw data, final results of analyses), share files with people of the same project
rsync
: FROM YOUR COMPUTER TO THE SERVER!!!! - Never from the server to your computer (for security)
To enter path to server, you need to add the log in info
Path to file(s) to transfer
Path to destination
# Type the following in your computer's terminal (not in the server!!!)
rsync file_in_computer username@cedar.computecanada.ca:/home/username/
# Will ask for password to server
# copies file_in_computer to the server in the folder /home/username
rsync username@cedar.computecanada.ca:/home/username/file_in_server ./
# Will ask for password to server
# copies /home/username/file_in_server from the server my computer
rsync
to transfer it to the server in a folder called unix_class
in $HOME
rsync