Main Content

Transfer Data to or from MATLAB in Cloud Center

Transfer data between MATLAB® on Cloud Center and your local machine using any of these methods: MATLAB Drive™, NICE DCV, Remote Desktop Protocol (RDP), Secure Copy Protocol (SCP), Secure File Transfer Protocol (SFTP), or FileZilla®.

To transfer data between Amazon S3™ and MATLAB in Cloud Center instead, see Transfer Data to Amazon S3 Buckets and Access Data Using MATLAB Datastore.

Use MATLAB Drive

Store and access your MATLAB data and files from anywhere using MATLAB Drive. Upload files to MATLAB Drive in the web browser through MATLAB Drive and access them in MATLAB on the cloud. The size of your MATLAB Drive depends on your MATLAB license. For more information, see MATLAB Drive Storage Quota (MATLAB).

To use MATLAB Drive in MATLAB on Cloud Center, use it in the web browser through MATLAB Drive or install MATLAB Drive Connector in MATLAB. To install MATLAB Drive Connector in MATLAB, click the MATLAB Drive button MATLAB Drive icon in the Current Folder toolbar. For more details, see Install MATLAB Drive Connector (MATLAB).

After you install MATLAB Drive Connector, you can access the files in your MATLAB Drive from within MATLAB. For more details about using MATLAB Drive, see Cloud File Storage (MATLAB).

MATLAB Drive Connector automatically synchronizes your MATLAB Drive files and keeps projects up to date between the Cloud Center instance and your local machine. For one-off data transfers, use the following methods on this page, which do not require an initial download of your MATLAB Drive folder contents.

Use NICE DCV or RDP

After you create a MATLAB resource on Cloud Center, access the web desktop of the cloud machine in a new tab on your web browser using NICE DCV software or using a remote desktop client. For more details, see Open MATLAB on the Cloud Machine.

If you are using NICE DCV, click Transfer files option on the toolbar to transfer individual files between your local machine and your machine on Cloud Center. You cannot use this method to transfer entire folders.

You can also use an RDP client such as Remote Desktop Connection (on Windows®) or Remmina (on Linux®) to connect to the instance on Cloud Center. You cannot use Remote Desktop Connection to transfer data if you are connecting from a Windows machine to a Linux machine.

Ensure that the remote desktop client can access the folders you want to share. After you connect, you can copy and paste files and folders between your local machine and your machine on Cloud Center.

Use Command Line Tools

Transfer data between your local machine and MATLAB on Cloud Center using command line tools such as SCP or SFTP. This section highlights only a few of the many available options for transferring files.

Use the SCP tool to access the remote host and transfer the file in a single command. Similarly, you can use the SFTP interactive interface to connect to a remote host, navigate its file system, and transfer files.

These examples show how to transfer the /home/cloudtmp/emem MAT file to the desktop on Cloud Center. This table shows which parameters to use when you connect to a Linux instance or a Windows instance on Cloud Center.

Parameters for Windows and Linux Instances on Cloud Center

ParameterLinux InstanceWindows Instance
UsernameubuntuAdministrator
Desktop Path/home/ubuntu/DesktopC:/Users/Administrator/Desktop
Way to AuthenticateUse the SSH private key. Use the password of the machine.

The SSH private key is the private key of the Amazon EC2® key pair you use to start an instance on Cloud Center. For more details about key pairs, see Amazon EC2 key pairs. The password of the machine is the one you use when you create the Cloud Center instance. These fields are in the Remote Access section when you create a cloud resource.

Edit Remote access configuration of MATLAB cloud resource in create MATLAB cloud resource step.

Use SFTP

Use the sftp command to connect to a Linux instance on Cloud Center at a command prompt on your local machine. Use the -i option if you need to select the SSH private key for authentication. Replace 144.212.244.17 with the IP address of your machine.

cd /home/cloudtmp
sftp -i /home/.ssh/your-key.pem \
  ubuntu@144.212.244.17:/home/ubuntu/Desktop

If you need to provide a password to connect to an instance on Cloud Center, omit the -i option.

cd /home/cloudtmp
sftp Administrator@144.212.244.17:/C:/Users/Administrator/Desktop

After you connect, you can transfer data using the SFTP options.

sftp> put emem.mat
sftp> ls
emem.mat
sftp> exit

To transfer folders instead of individual files, add the -r option for recursive copy. For example, use this command to copy a folder and its contents.

sftp> put -r folderToCopy/
For more information about the SFTP tool, use these commands:

sftp -help
man sftp

Transfer Files Using SCP

Use the scp command to access a remote host and transfer a file. Use the -i option if you need to select the SSH private key for authentication. Replace 144.212.244.17 with the IP address of your machine.

scp -i /home/.ssh/your-key.pem emem.mat \
  ubuntu@144.212.244.17:/home/ubuntu/Desktop

>If you need to provide the password to connecting to an instance on Cloud Center, omit the -i option.

cd /home/cloudtmp
scp emem.mat \
  Administrator@144.212.244.17:/C:/Users/Administrator/Desktop

To transfer folders instead of individual files, add the -r option for recursive copy. For example, use this command to copy a folder and its contents.

scp -r folderToCopy/ Administrator@144.212.244.17:/C:/Users/Administrator/Desktop
For more information about the SCP tool, use these commands:

scp -help
man scp

Transfer Files Using FileZilla GUI

FileZilla is an interactive utility which lets you connect to MATLAB on Cloud Center and transfer files by dragging and dropping. On Windows, you can also use WinSCP®. For example, suppose you want to transfer the C:\cloudtmp\emem.mat MAT file from your local machine to your Cloud Center instance using FileZilla. Follow these steps:

  1. Start FileZilla and set its Local site to the folder you want to transfer your local file from (or to).

  2. Connect FileZilla to your cloud cluster file system by specifying the host that is the IP address of your Cloud Center instance. Specify the username ubuntu for the Linux instance or Administrator for the Windows instance. Specify port 22 for SFTP connections.

  3. If you are connecting to a Windows instance on Cloud Center, provide a password. Instead, if you are connecting to a Linux instance on Cloud Center, do not provide a password, but add your SSH private key file under Edit > Settings. In the Select pane of the Settings dialog box, choose SFTP. In the Public Key Authentication pane, click Add keyfile. Navigate to the SSH private key file. Upload the PEM format key file you download from Cloud Center. When the key file appears in the list, click OK to dismiss the Settings dialog box.

  4. When FileZilla is configured with the proper key file, click Quickconnect.

  5. After you connect, set the Remote site path to /home/ubuntu/Desktop for a Linux instance or C:/Users/Administrator/Desktop for the Windows instance.

  6. Drag the emem MAT file from the local column to the remote column.

Related Topics