Uploading Data to LabCAS

Instructions on using SFTP to send data into LabCAS.

This document provides instructions on how to upload data into LabCAS with information on:

  • how to use SFTP
  • getting your LabCAS username and SFTP private key
  • installing and running the SFTP software

Before uploading data, please make sure to organize your files in a directory structure corresponding to a collection consisting of one or more datasets, as previously determined with the JPL Informatics Center (ic-data@jpl.nasa.gov).

SFTP: The SSH File Transfer Protocol (one-time setup)

To upload data into LabCAS, you’ll use the SSH (Secure Shell) File Transfer Protocol (SFTP), which requires an SFTP username and a private key file. To get your SFTP username and private key file, contact the JPL Informatics Center by email at ic-data@jpl.nasa.gov; send your name, your institution name as well as the project for which you will be uploading data—such as “EDRN Prostate MRI”.

Once the JPL team receives your request, you’ll be sent your SFTP username and a file containing the private key using the JPL Large File Transfer service. The private key isn’t a large file, but using the LFT service helps keep your private key file private.

🚨 You should keep your private key file safe! It’s essentially a password, and disclosing it could put your data at risk.

👉 Note: Your SFTP username may not be the same as your EDRN, MCL, NCI, or institutional username—or even the username you use to log into your computer.

Unix Users (including Apple macOS)

If you use Apple macOS, some kind of Linux, or another flavor of Unix, then follow the instructions below. Windows users, please see the next section

Installing your Software and Private Key (one-time setup—on the machine you will be using to upload files)

Most modern Unix systems already include the sftp program. To see if it’s on yours, open a terminal window and type sftp and press Return or Enter. If you get a “usage” message, you’ve got sftp. If not, ask your system administrator to have sftp installed.

Next, retrieve the private key file sent to you via LFT from the JPL Informatics Center and save it on the machine you will be using to upload files (note the location where you save this file). This can be your home directory or in your “Documents” folder. For example, if you’re on macOS and your computer’s login name is lisa and your private key file is foxchase.key and you save the file in your Documents folder, then the full path to your private key file is:

/Users/lisa/Documents/foxchase.key

You’ll need the full path to your private key file (as well as your SFTP username) for the next section.

🚨 Important! The private key file must be readable only by you. Type the following command in a terminal window to make sure this is the case: chmod 600 PRIVATEKEYFILE.key. For example, if your private key file is in /home/tgreene/Desktop/cancer-institute.key, type:

chmod 600 /home/tgreene/Desktop/cancer-institute.key

Running SFTP (Uploading your data)

Connect with sftp. Open a terminal and change the current working directory to where you have your collection of data to upload. Then enter the following command:

sftp -C -i PRIVATEKEYFILE.key USERNAME@labcas.ftpaccess.cc

Replace PRIVATEKEYFILE.key with the full path to your private key file and replace USERNAME with your assigned SFTP username. For example, if your SFTP username was assigned by the JPL Informatics Center as lisa-foxchase and your private key file is in /Users/lisa/Documents/foxchase.key, the command you would enter is:

sftp -C -i /Users/lisa/Documents/foxchase.key lisa-foxchase@labcas.ftpaccess.cc

👉 Note: The first time you run this command, you may see this message—or something similar to it:

The authenticity of host 'labcas.ftpaccess.cc (44.236.254.100)' can't be established.
RSA key fingerprint is SHA256:6xtOnepeFGgKqrN3gR7s9hAdQo98LUEKKtzjg1B1dYo.
Are you sure you want to continue connecting (yes/no)? 

Please answer yes to this.

Running this command will put you at the sftp> prompt. From this prompt enter the following command:

put *

This will place all local files in the current local directory into the current directory on the server.

Other useful commands (if needed):

  • Create a sub-directory on the server: mkdir SUBDIR
  • Change into that sub-directory on the server: cd SUBDIR
  • Put all local files recursively (in sub-directories) in the current local directory into the current directory on the server: put -r * . (note the final dot or period at the end of this command).

Once you’ve put all your files onto the LabCAS server, email the LabCAS team to let them know the new data is available and to coordinate the publishing phase.

Windows Users

If you use the Windows operating system, follow these instructions. Unix (including Apple macOS) users, see the preceding section above.

Installing your Software and Private Key (one-time setup)

The Windows operating system doesn’t come with an SFTP program. The program we recommend is WinSCP. As of this writing, the latest version of WinSCP is 5.17.10.

To get WinSCP:

  1. Open the Microsoft Store on your computer.
  2. Type “WinSCP” in the search box.
  3. Click “Buy”.

You can also get WinSCP for free by visiting the WinSCP download page, scrolling past the advertisements, and clicking the “DOWNLOAD WINSCP” (with version number) button at the bottom.

In both cases, you may need administrator privileges to complete the installation. The default choices for various installation options are fine in all cases.

Next, retrieve the private key file sent to you via LFT from the JPL Informatics Center and save it on the machine you will be using to upload files (note the location where you save this file), such as your “Documents” folder, or on your Desktop.

Running WinSCP

With your SFTP username, private key file, and WinSCP, you’re ready to upload data. Start by launching WinSCP from the Windows menu or from its application icon. On the first launch, a window will appear where you can enter new login information. Enter the information as follows:

  • Host name: labcas.ftpaccess.cc
  • Port number: 22
  • User name: Enter your SFTP username assigned by the JPL Informatics Center
  • Password: leave this blank

Next, click the “Advanced” button so you can tell WinSCP where your private key file is:

  1. In the left panel, click “Environment” and make sure “Preserve remote timestamp” is not selected; select any of the other two options if it is.
  2. In the left panel, click “Authentication” under “SSH”.
  3. Click the (ellipsis) button.
  4. In the lower-right, click the file filter drop-down and select “All Files (*.*)”.
  5. Navigate to your saved private key file and select it.
  6. Click “Open”.
  7. When prompted “Do you want to convert this OpenSSH private key to PuTTY format?” click “OK”.
  8. When prompted to “Save converted private key”, click “Save”. This saves the private key in a format compatible with WinSCP in the same folder as the private key you received from the JPL Informatics Center, but with a new extension of .ppk instead of .key.
  9. Click “OK” on the confirmation dialog indicating the key was converted and saved.
  10. Click “OK” to close the “Advanced Site Settings”.
  11. Click “Save” to save all these settings for future use; click “OK” to use the default save settings.
  12. Finally, click “Login” to connect to the LabCAS SFTP server.

The first time you connect, you may be asked “Continue connecting to an unknown server and add its host key to a cache?”; please click Yes to this.

At this point, your WinSCP window displays folders on the LabCAS server. You can then simply upload your files to the LabCAS server by dragging and dropping them to the appropriate sub-directory.

👉 Note: You may see an error message that mentions something like the following:

Upload of file…was successful but error occurred while setting the permissions and/or timestamp.

If this appears, please just click the Skip all button and allow WinSCP to continue normally.

Once you’ve put all your files onto the LabCAS server, email the LabCAS team to let them know the new data is available and to coordinate the publishing phase.