Frequently Asked Question
1. For Linux/MacOS
1.1 The scp command
It is used to securely transfer files between two machines using SSH. The standard syntax is:
- From PC/Laptop to Aziz
scp [options] local_path username@remote_ip_address:remote_path
- From Aziz to PC/Laptop
scp [options] username@remote_ip_address:remote_path local_path
- local_path/remote_path: The file/directory you wish to copy.
- username: The username of the remote machine (e.g. your username at Aziz supercomputer)
- remote_ip_address: The IP address of the remote machine, Aziz's login node (e.g., 10.113,16,6)
Common Options (Flags):
-r
: Recursively copy entire directories.-C
: Enable compression to speed up file transfer.-v
: Verbose mode; provides detailed information about the transfer.
Example 1: Copy Data from PC/Laptop to Aziz
$ scp local_file.txt hpctech@10.113.16.7:/hpctech/home/
The above command copies the text file, local_file.txt, from the PC/laptop to the home directory of the hpctech Aziz user account.
Example 2: Copy Data from Aziz to PC/Laptop
$ scp -r hpctech@10.113.16.7:/hpctech/home/Jupyter .
The above command copies Jupyter directory and its contents located in the home directory on Aziz to the PC/laptop.
Note: Running the scp command requires the user to enter the password of the remote machine (Password of your Aziz's account)
1.2 The rsync command
The rsync
utility is commonly used for efficient file transfers and synchronization between a local machine and a remote system. It uses SSH for security and is especially useful when copying large files or directories. It is syntax looks like the syntax of scp
command mentioned above.
Common Options (Flags):
-a
: Archive mode, which preserves permissions, symlinks, and timestamps.-v
: Verbose mode, providing detailed information about the transfer.-z
: Compress files during transfer for faster transmission.-P
: Show progress and enable partial transfers.--delete
: Delete files at the destination that are no longer present in the source.-e "ssh"
: Use SSH as the transport protocol.
Example 1: Synchronize the Data from PC/Laptop to Aziz
rsync -av local_dir hpctech@10.113.16.7:/home/hpctech/remote_dir
Example 2: Synchronize the Data from Aziz to PC/Laptop
rsync -av hpctech@10.113.16.7:/home/hpctech/remote_dir local_dir
2. For Windows Users
2.1 Using MobaXterm
Copying Data from PC/Laptop to Aziz:
You need to drag and drop the file to the SSH Browser (list of files on the left side) as it is shown below:
You can check if the file is uploaded by using ls command as shown below:
Copying data from Aziz to PC/Laptop:
You will need to right-click on the file as to open the menu and click on Download
After that, you can select the destination folder/directory where you would like the file downloaded.
2.2 Using WinSCP
Copying data from PC/Laptop to Aziz:
You will need to drag and drop the file from the source folder to the destination directory as shown below:
after that, you will click on OK in the Upload window
Copying data from Aziz to your PC/Laptop:
You will need to drag and drop the file to the destination folder/directory as it is shown below: