Last Updated: April 10, 2017

Hosted Command Line Interface (Legacy)

This guide provides a brief introduction to the hosted CLI.


To use the CLI you must have a Globus account with ssh access enabled. To enable your account for ssh access you must add your ssh public key to your Globus account by visiting the Manage Identities page and clicking "add linked identity", followed by "Add SSH Public Key". If you do not have an ssh key, follow the directions here to create one.

CLI Structure

There is no need to install custom client software. CLI users interact with Globus via a secure shell. The general structure of a CLI request is:

$ ssh <username> <command> <options> <params>

where: <username> is your Globus user name, <command> is the Globus command to execute, <options> are the options available for <command>, and <params> are the parameters passed to <command>. If desired, gsissh can be used in place of ssh.

File Transfer

The Globus transfer service provides the transfer command for moving files.

All Globus accounts are provisioned with two endpoints for exploratory use, so as soon as you have an account you should be able to transfer /share/godata/file1.txt from endpoint go#ep1 to your home directory on go#ep2, as shown below by user demodoc:

$ ssh transfer -- go#ep1/share/godata/file1.txt go#ep2/~/myfile.txt
Task ID: 9be793ca-5983-12e6-c030-22100b92c261
$ ssh status 9be793ca-5983-12e6-c030-22100b92c261
Task ID     : 9be793ca-5983-12e6-c030-22100b92c261
Request Time: 2016-10-03 16:08:23Z
Command     : transfer -- go#ep1/share/godata/file1.txt go#ep2/~/myfile.txt
Label       : n/a
Status      : SUCCEEDED
$ ssh ls go#ep2/~/

Online Help

You can execute the help command to view the current Globus CLI command set:

$ ssh help
Type '<command> -h' for basic help on a command.
Type 'man <command>' for detailed help.

Task Management        Endpoint Management         Other
---------------        -------------------         -----
cancel                 acl-add                     echo
details                acl-list                    help
events                 acl-remove                  history
modify                 bookmark-add                identity-details
status                 bookmark-list               man
wait                   bookmark-remove             profile
Task Creation          endpoint-add
-------------          endpoint-deactivate
delete                 endpoint-details
rm                     endpoint-modify
transfer               endpoint-remove
File Management        endpoint-role-add
---------------        endpoint-role-list
ls                     endpoint-role-remove
mkdir                  endpoint-search
rename                 server-add

In addition, <command> -h displays a command syntax summary and man <command> displays the command’s manual page.

Endpoint Activation

Activation is a Globus endpoint user authentication mechanism; it enables endpoint owners to determine who is transferring files. Transfers will only proceed when both the source and destination endpoints are activated. You can practice by activating the Globus endpoints:

$ ssh endpoint-activate go#ep1
$ ssh endpoint-activate go#ep2

In the following example user demodoc activates NERSC endpoints using the ssh -t option to prevent the passphrase from being echoed to stdout. Activation gives you authorization to the endpoint itself, but you still need to be authorized (have permissions) to the given resources on an endpoint before you can access them through Globus. Being authorized to access an endpoint is separate from being further authorized to access specific resources on and endpoint. Access to a given endpoint is entirely within the endpoint owner’s control, so you must contact owners directly to obtain permission to use their endpoints.

$ ssh -t endpoint-activate nersc#carver
Myproxy activation for endpoint: 'nersc#carver'
Using Myproxy server: ''
Enter username (Default: 'demodoc'):
Enter password:
Connection to closed.
$ ssh -t endpoint-activate nersc#hopper
Myproxy activation for endpoint: 'nersc#hopper'
Using Myproxy server: ''
Enter username (Default: 'demodoc'):
Enter password:
Connection to closed.

Because 'carver' and 'hopper' have been activated using NERSC credentials, and the 'carver' and 'hopper' owners have authorized the user to access their endpoints, demodoc is able to transfer a file:

$ ssh transfer -- nersc#carver/share/godata/file1.txt nersc#hopper/~/myfile.txt
Task ID: 6356aa16-ed20-11df-aa30-1231350018b1

Now, user demodoc activates the XSEDE endpoint 'stampede'. The endpoint owner requires that the user go to the XSEDE OAuth service so that the user’s password does not flow through Globus. This requires copying the URL shown in the terminal window to a web browser and following the prompts. Once the user has authenticated on XSEDE’s OAuth server, a confirmation message is displayed in the terminal:

$ ssh -t endpoint-activate xsede#stampede
*** Please use this URL to activate the endpoint(s) ***
*** Waiting... Press CTRL-C to cancel ***
*** Credential Received! ***
Connection to closed.

An endpoint can also be activated using gsissh:

$ gsissh endpoint-activate -g ci#pads
Credential Subject : /DC=org/DC=doegrids/OU=People/CN=Demo Docuser 595766/CN=576965990/CN=436543765
Credential Time Left: 11:59:54
Activating 'ci#pads'

Endpoints can also be activated inline by specifying the -g option with the transfer command.

CLI: Beyond the Basics

Endpoint Management

In addition to serving as a discovery mechanism for community endpoints Globus enables users to create and (optionally) share their own endpoint definitions.

Logical endpoints can be created using the endpoint-add command. They can be continually modified (by adding physical addresses, renaming, etc.) and persist until explicitly deleted with the endpoint-remove command.

In the following example user demodoc adds an endpoint with a standalone ssh command. To demonstrate the Globus interactive shell mode, the user then adds two endpoints within an interactive Globus CLI session. Two logical endpoints are created, with vpac having one associated physical address and never having two:

$ ssh endpoint-add vpac -p gsi
$ ssh
Welcome to, demodoc. Type 'help' for help.
$ endpoint-add -p never
$ endpoint-add -p never
$ exit
Connection to closed.

Globus endpoint definitions are either public or private. Public endpoints are visible to all Globus users; private endpoints are visible only to those who created them. Here we see that after user demodoc makes an endpoint public, demodoc#never in visible in the public list:

$ ssh
$ endpoint-modify --public never
Set 'never' to public
$ endpoint-list -p
$ endpoint-list -p -v demodoc#never
Name : demodoc#never
Host(s) : gsi, gsi
Subject(s) :
MyProxy Server: n/a

endpoint-list with no options displays the user’s list of previously-activated endpoints (both public and private), along with the remaining activation time for each endpoint:

$ ssh
$ endpoint-list
alcf#dtn 09:36:54
ci#pads 08:54:51
go#ep1 10:34:43
go#ep2 10:34:43
demodoc#never 09:36:54
nersc#dtn 08:25:47

In addition to explicit creation, endpoints can be implicitly created by way of transfer. If the transfer command refers to a hostname instead of a logical name, a private endpoint will be automatically created to represent it. Further information about implicit endpoint creation can be found in the transfer man page.

Data Management

Globus provides the transfer command for moving files. Globus also supports features such as file synchronization and idempotent submission.

The following example shows a detached recursive transfer. By default transfer will be canceled if your ssh session is disconnected or you press Ctrl-C. The transfer command reads an EOF or Ctrl-D terminated list of source and destination pairs from stdin and attempts to transfer all of the files in the list until successful or the user specified deadline has been reached. The following example directs Globus to recursively copy the contents of a directory from UChicago RCC to NERSC. Any outstanding transfer requests not completed after the 6 hour deadline (-d 6h) will be ignored:

$ echo "ucrcc#midway/demodoc/sdata/10Kfiles100M/ nersc#dtn/project/mpccc1/dest/sdata/alcf20100122/ -r" | ssh transfer -d 6h
Task ID: 427b63ec-ee04-11df-aa30-1231350018b1
Created transfer task with 1 file(s)

Another way to specify a transfer dataset is via a file list. A file list can contain a mix of directory source/dest pairs and individual file source/dest pairs. The following example specifies that the 10,000 individual files listed in file 10Kmidway-nersc100MB.dat should be transferred:

$ cat ./10Kmidway-nersc100MB.dat | ssh transfer
Task ID: 28d854ae-ee18-11df-aa30-1231350018b1
Created transfer task with 10000 file(s)

The following two examples highlight the Globus one-way file synchronization feature. The first executes a file size-based check, the second executes a full md5sum check:

$ echo "go#ep1/share/godata/ go#ep2/~/ -r -s 1" | ssh transfer
Task ID: 609b53fc-ebff-11df-aa30-1231350018b1
Created transfer task with 1 file(s)
$ echo "ucrcc#midway/demodoc/sdata/10Kfiles100M/ nersc#dtn/project/mpccc1/dest/sdata/alcf20100122/ -r -s 3" | ssh transfer
Task ID: 1c05440a-ee57-11df-aa30-1231350018b1
Created transfer task with 1 file(s)

The following example demonstrates the use of the transfer command to transfer a single file from the go#ep1 source endpoint to the go#ep2 destination endpoint.

$ ssh transfer -- go#ep1/share/godata/file1.txt go#ep2/~/file1.txt
Task ID: e9f0be51-49df-11e6-8222-22000b97daec
$ status -l 1 -a
Task ID     : e9f0be51-49df-11e6-8222-22000b97daec
Request Time: 2016-07-14 16:27:54Z
Command     : transfer -- go#ep1/share/godata/file1.txt go#ep2/~/file1.txt
Label       : n/a
Status      : SUCCEEDED

Once-and-only-once submission:

$ ssh transfer --generate-id
$ cat ./10Kmidway-nersc100MB.dat | ssh transfer --taskid=7f2fb1d6-ee76-11df-aa30-1231350018b1
Killed by signal 2.
$ cat ./10Kmidway-nersc100MB.dat | ssh transfer --taskid=7f2fb1d6-ee76-11df-aa30-1231350018b1
Deadline : 2010-11-12 19:24:31Z
Task ID: 7f2fb1d6-ee76-11df-aa30-1231350018b1
Created transfer task with 10000 file(s)
$ cat ./10Kmidway-nersc100MB.dat | ssh transfer --taskid=7f2fb1d6-ee76-11df-aa30-1231350018b1
Notice: Task ID already created


Globus provides users with realtime and historical information about their tasks. Push mechanisms include email notifications of interesting events such as task completion, credential expiration, and account creation. Pull mechanisms return metadata at the task level (the task id returned by the transfer command) and the subtask level (each individual file transfer is considered a subtask and has a unique id.)

The default status command lists all pending tasks:

$ ssh
$ status
Task ID : 28d854ae-ee18-11df-aa30-1231350018b1
Request Time: 2010-11-12 04:48:57Z
Command : transfer (+10000 input lines)
Status : ACTIVE

The status command also provides a way to list the last n tasks (-l n) regardless of state (-a):

$ ssh
$ status -l 4 -a
Task ID : 3f4c2cc6-ee20-11df-aa30-1231350018b1
Request Time: 2010-11-12 05:46:51Z
Command : scp -g alcf#dtn:~/samplefile.txt

Task ID : 28d854ae-ee18-11df-aa30-1231350018b1
Request Time: 2010-11-12 04:48:57Z
Command : transfer (+10000 input lines)
Status : ACTIVE

Task ID : 427b63ec-ee04-11df-aa30-1231350018b1
Request Time: 2010-11-12 02:26:30Z
Command : transfer -d 6h (+1 input line)

Task ID : 4a3c471e-edef-11df-aa30-1231350018b1
Request Time: 2010-11-11 23:56:24Z
Command : scp -D -r ucrcc#midway:/demodoc/sdata/10Kfiles100M/ nersc#dtn:/project/mpccc1/dest/sdata/alcf20100122/

The default details command provides an overview of a transfer’s state:

$ ssh
$ details 28d854ae-ee18-11df-aa30-1231350018b1
Task ID : 28d854ae-ee18-11df-aa30-1231350018b1
Task Type : TRANSFER
Parent Task ID : n/a
Status : ACTIVE
Request Time : 2010-11-12 04:48:57Z
Deadline : 2010-11-13 04:48:57Z
Completion Time : n/a
Total Tasks : 10000
Tasks Successful : 8831
Tasks Expired : 0
Tasks Canceled : 0
Tasks Failed : 0
Tasks Pending : 1169
Tasks Retrying : 8
Command : transfer (+10000 input lines)
Files : 10000
Directories : 0
Bytes Transferred: 925997465600
MBits/sec : 2224.619

The details -t command lists subtasks (i.e. individual files) for a transfer task. In the following example the command produces a 10,001 line file (a header, plus one line for each file):

$ ssh details -t -f all -O csvh 28d854ae-ee18-11df-aa30-1231350018b1 > details.csv

The events command provides information about events that occurred while executing a task. In this first example user demodoc is inspecting the progress of an earlier checksum-based sync by examining the "files_summed=" counts:

$ ssh events 1c05440a-ee57-11df-aa30-1231350018b1 | tail -10
Description : Performance monitoring event
Details : bytes_summed=349700096000 files_summed=3335
Task ID : 1c05440b-ee57-11df-aa30-1231350018b1
Parent Task ID: 1c05440a-ee57-11df-aa30-1231350018b1
Time : 2010-11-12 13:20:09.578755Z
Description : Performance monitoring event
Details : bytes_summed=355886694400 files_summed=3394

In this example, user demodoc is extracting all events that occurred while transferring a 1TB dataset (and storing them in a file for later inspection):

$ ssh events -f all -O csvh 28d854ae-ee18-11df-aa30-1231350018b1 > events.csv

Once your Globus task has finished an email will be sent to the address specified in your profile. Here is an example transfer completion notification:

Subject: Task 28d854ae-ee18-11df-aa30-1231350018b1: SUCCEEDED
From: "Globus Notification" <>

=== Task Details ===
Task ID : 28d854ae-ee18-11df-aa30-1231350018b1
Task Type : TRANSFER
Parent Task ID : n/a
Request Time : 2010-11-12 04:48:57Z
Deadline : 2010-11-13 04:48:57Z
Completion Time : 2010-11-12 05:51:08Z
Total Tasks : 10000
Tasks Successful : 10000
Tasks Expired : 0
Tasks Canceled : 0
Tasks Failed : 0
Tasks Pending : 0
Tasks Retrying : 0
Command : transfer (+10000 input lines)
Files : 10000
Directories : 0
Bytes Transferred: 1048576000000
MBits/sec : 2248.957


The cancel command enables you to kill pending transfers for a given task. Files already copied by Globus are unaffected by cancel. Information about the state of each file can be extracted with details (SUCCEEDED files were transferred prior to the cancel):

$ ssh cancel 639bb59a-bccc-11df-b9bf-1231391536db
Canceling task '639bb59a-bccc-11df-b9bf-1231391536db'.... OK
$ ssh details -t -f status,src_file -O csv 639bb59a-bccc-11df-b9bf-1231391536db | grep SUCCEEDED
$ ssh details -t -f status,src_file -O csv 639bb59a-bccc-11df-b9bf-1231391536db | grep FAILED

© 2010- The University of Chicago Legal