A basic token is created from an access key ID and secret, which authorizes a transfer user access to a specific area of a storage and authenticates that user to the storage. Basic tokens are less restrictive than transfer tokens. They can be used to transfer with any Aspera® server that supports access keys (except forIBM Aspera on Cloud).
Procedure
-
Create an access key for the storage and retrieve its ID and secret, as described in Access key authentication.
-
Create a basic token by encoding the
access_key_id:secret in base64.
$ echo -n access_key_id:access_key_secret | base64
For example,
$ echo -n diDeuFLcpG9IYdsvxj0SCq4mOohNJTKvp5Q2nRWjDgIA:aspera | base64
The basic token looks similar to the following output:
ZGlEZXVGTGNwRzlJWWRzdnhqMFNDcTRtT29oTkpUS3ZwNVEyblJXakRnSUE6YXNwZXJh
-
Set the basic token as an environment variable by running the following command:
$ export
You can also specify the basic token on the command line by using the -W "Basic token_string".
-
Transfer content.
To upload a file, use the following syntax:
$ ascp -i path/to/private_key_file -d source_path username@hostname:destination_path
Where the path to the private key file is:
- /Library/Aspera/var/aspera_tokenauth_id_rsa
The destination_path can be / to indicate the top of the access key storage, or /path to indicate a subdirectory.
For example,
$ ascp -i /Library/Aspera/var/aspera_tokenauth_id_rsa -d testfile03 xfer@10.0.3.4/tmp