FTP - Linux/Mac

# FTP - Linux/Mac

File Transfer Protocol, Linux, Mac, SFTP, Secure, Anonymous, Upload,

NRAO Employees: Network access is for use on NRAO-approved machines only. Complete the and have it authorized by your local computing division head before attempting any connections except "nraoPUBLIC". Please note that VPN is the preferred remote connection technology.

Visitors: May make use of NRAO public wireless networks where available. For RFI restricted areas, contact the Help Desk.

## FTP Services

The NRAO provides two ftp services: anonymous and secure.

Anonymous ftp is used mostly by non-NRAO staff to either retrieve files or upload files into the incoming directory. You can only connect to the anonymous ftp site as the user ftp or anonymous and therefore only have limited read-only access to the NRAO system.

The specifics of how to connect depend on your FTP client (command line ftp, FileZilla, etc.)  The instructions here are for the old fashioned command line interface.

## Anonymous FTP

To connect to one of the three servers, pick one of these commands:

        ftp ftp.aoc.nrao.edu
ftp ftp.cv.nrao.edu
ftp ftp.gb.nrao.edu


When challenged for a username, use anonymous.  The convention is to enter your e-mail address as the password; this helps us diagnose things in the event of problems.

Once in, you can then use the normal ftp commands cd (to change directory), ls to list files, and get to retrieve files. Remember to use the bin command if you are retrieving a binary file such as FITS.

### FTP File Upload

NRAO ftp servers are set up to permit a limited upload service.  Each server has a designated area for this, with a set of subdirectories under it as "lock boxes" for individual staff members.  YOU CANNOT READ OR SEE THE FILES THAT YOU UPLOAD VIA FTP. The first step is to verify with your NRAO colleague the exact account name (e.g., pmurphy for Pat Murphy) and ask them if they have a FTP lockbox or incoming area.  Then you can use the put command as follows (replace pmurphy or jrobnett or cclark with the appropriate account name):

• For Charlottesville:
ftp ftp.cv.nrao.edu
(log in as anonymous, use your e-mail address as password)
cd Lockbox/pmurphy
bin
put 3c273.fits
put sourcecode.tar.gz
quit
This example shows someone uploading a FITS file and a "tarball" (both binary) into a staff member's lockbox area.
• For New Mexico:
ftp ftp.aoc.nrao.edu
(log in as anonymous, use your e-mail address as password)
cd incoming/jrobnett
bin
put 3c84.fits
put lustre.tar.gz
quit
This example shows someone uploading a FITS file and a "tarball" (both binary) into a staff member's lockbox area.
• For Green Bank:
ftp ftp.gb.nrao.edu
(log in as anonymous, use your e-mail address as password)
cd incoming/cclark
bin
put psr_0329+54.fits
put jaffa_kree.doc
quit
This example shows someone uploading a FITS file and a word file (both binary) into a staff member's lockbox area.

To access the contents of your FTP Lockbox:

Linux:

cd /home/ftp/Lockbox/username

Mac:

Connect to smb://samba-site/ftp  (where site is "cv", "gb" or "aoc")

Navigate to "Lockbox/username"

### FTP File outgoing ("NRAO-staff") area

The FTP outgoing area can be used to make files available for others to download anonymously.

To access the contents of your FTP outgoing area:

Linux:

cd /home/ftp/NRAO-staff/username

Mac:

Connect to smb://samba-site/ftp/NRAO-staff  (where site is "cv", "gb" or "aoc")

## Secure FTP

Secure ftp is used by NRAO staff to either upload file to or download files from NRAO systems. You need a NRAO Unix account to do this. The advantage of secure ftp is that you login as your normal user account, and therefore have access to all the files and folders in your home directory, as well as other file systems and shares visible via NFS.

The servers used at the sites are different from the normal ftp servers; they are in fact the same as the login (ssh) bastion servers. Assuming you are using the command line (and not FileZilla or gftp or some other graphical client that supports sftp), choose one of:

• sftp sftp.aoc.nrao.edu
• sftp sftp.cv.nrao.edu
• sftp sftp.gb.nrao.edu

Then when challenged, enter your Unix username and password. Once in, you can use the usual cd, ls, pwd, get, and put commands.