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.
Windows™ does not have a native base64 encoder. These instructions require you to download base64.exe, a free utility. The infile in the command is a text file that contains the text string of access_key_id:secret.
> base64.exe infile outfile
The basic token in the outfile looks similar to the following output:
ZGlEZXVGTGNwRzlJWWRzdnhqMFNDcTRtT29oTkpUS3ZwNVEyblJXakRnSUE6YXNwZXJh
Open the file and delete any line breaks so that the token text is one continuous string.
-
Set the basic token as an environment variable by running the following command:
> set ASPERA_SCP_TOKEN="Basic token_string"
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:
- C:\Program Files\Aspera\Enterprise Server\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 C®:\Program Files\Aspera\Enterprise Server\var\aspera_tokenauth_id_rsa -d testfile03 xfer@10.0.3.4/tmp