Contents

  1. FileZilla: GUI sftp client
  2. SCP: secure copy
  3. SFTP via the command line

There are several ways to transfer files to and from your virtual machine using Secure (or SSH) File Transfer Protocol (SFTP). They all use the following information to create the connection:

  • Hostname : the IP address of your virtual machine, for example 103.61.226.36
  • Protocol : SFTP using Port : 22
  • eRSA username
  • eRSA password

1. FileZilla

FileZilla is one of many programs that provides easy, point-and-click SFTP (secure file transfer protocol). Not only can you easily transfer files between your local computer and your virtual machine (VM), but you can also open and edit documents that are on your VM, using programs on your local computer. You can also use WinSCP, Cyberduck or other sftp clients in a very similar way.

Download and Install FileZilla

  1. For Ubuntu - Install from the Ubuntu Software Centre app
  2. Mac and Windows - Download the program file FileZilla
  3. Double click file - follow installation instructions for Windows
  4. For Mac - drag the filezilla.app file to your Applications folder.
  5. Open FileZilla

SFTP connection to the VM

  1. Open File -> Site Manager .
  2. Click New Site and give it a name.
  3. Insert the IP address of the instance as Host
  4. Logon Type : choos "normal" to save your password for easier connections in future, or "ask for password" for greater security.
  5. For "User: enter your eRSA username
  6. Click Connect


FileZilla connection

The left side of the FileZilla window will list the files of your computer.
The right side will contain the folders and files on the VM.


  • Navigate to your data storage directory in the right side of the FileZilla screen.

  • Drag and drop files and directories between your local computer and the VM.

  • Right click in the file list area to:

    • Create a directory or text file
    • Edit a text document (you may need to adjust FileZilla/Edit -> Settings/Preferences -> File Editing to ensure documents open in your local computer's default text editor.
    • Delete, download or rename files or directories, etc.



2. SCP: secure copy

SCP is a simple method for transferring files between computers.

The basic command for Secure Copy is like a UNIX cp, but adding a connection to a different computer in the file path

scp <Path_To_Source_File> <Path_to_Destination>

Between a local Mac/Linux and the VM

Enter the command from your local computer's Terminal app.

To upload a file to the VM:

scp  <local-file-path> username@ip_address:<VM-file-path>

To download a file from your VM:

scp -i  username@ip_address:<VM-file-path> <local-file-path>

Between your VM and a data storage server

If you have data stored on a remote server, you can transfer files between it and the VM through the command-line on the VM.

You will need a host address for the data storage server, and your username, plus usually a password.

scp username@host.address.edu.au:/data/myDirectory/file.txt /mnt/data/
scp /mnt/data/results.zip username@host.address.edu.au:/data/myDirectory/

You will usually then be prompted to enter the password for your data storage.

n.b. use scp -i path/to/key ... if your remote server has ssh keys rather than password access.


3. SFTP via the Command Line

Secure file transfer is also available between the VM and remote data storage.

Enter the 'sftp' command on your VM, and you will have access to the remote host.

sftp username@host.address.edu.au - you will usually be prompted for a password.

or

sftp -i path/to/key username@host.address.edu.au - if the remote server has ssh key authentication

You are now accessing the remote data storage server, and you can navigate the files on the server as per usual with commands like cd and ls.

The commands get and put will transfer data between the machines:

get <remote_server_file.txt> </mnt/localVM_destination/>

put </mnt/localVM_destination/file.txt> <remote_directory/>

to close the sftp connection, type exit.


Did you find this information useful? Share your feedback here.