How to copy files from/to a Linux VM
Copy files with SFTP
We recommend to use FileZilla Client to connect to your Linux VM. FileZilla supports Windows, Linux and Mac. Other SFTP clients can also be used. E.g., CyberDuck, WinSCP.
In Site Manager dialog of FileZilla, create a new site and fill in the following information:
- Host: the FQDN of your VM.
- Port: leave it blank
- Protocol: SFTP - SSH File Transfer Protocol
- Logon Type: Ask for password
- User: Your username
- Password: leave it blank
After clicking Connect button, enter password dialog will popup. In this dialog, uncheck the Remember password until FileZilla is closed checkbox, and enter the same password as SSH login.
Copy files with SCP
Linux and macOS systems by default come with a command line SCP client. Windows SCP client is available in MobaXterm and Git bash.
There are a lot of in-detail manuals for the scp command to be found on the Internet, here is a quick guide on how to use it normally:
# Upload the file yourFile.xyz to your home directory on the VM
$ scp yourFile.xyz username@cerzheprd03.its.auckland.ac.nz:~/.
# Upload the folder yourFolder to your home directory on the VM
$ scp -r yourFolder username@cerzheprd03.its.auckland.ac.nz:~/.
Downloading files from your home directory on the login node to your home directory on your local machine is a similar process as shown below:
# Download the file ~/yourFile.xyz to your home directory on your computer
$ scp username@cerzheprd03.its.auckland.ac.nz:~/yourFile.xyz ~/.
# Download the folder yourFolder to your home directory on your computer
$ scp -r username@cerzheprd03.its.auckland.ac.nz:~/yourFolder ~/.