Basic Tokens
- On the server, create a system user xfer and configure it for token authorization, as described in Setting Up Transfer Token Authorization.
- Create an access key for the storage and retrieve its ID, as described in Access Key Authentication.
-
Create a basic auth token by encoding the
access_key_id:secretin base64.# echo -n access_key_id:access_key_secret | base64For example:
# echo -n diDeuFLcpG9IYdsvxj0SCq4mOohNJTKvp5Q2nRWjDgIA:aspera | base64The basic auth token looks similar to the following:
ZGlEZXVGTGNwRzlJWWRzdnhqMFNDcTRtT29oTkpUS3ZwNVEyblJXakRnSUE6YXNwZXJhIf the basic auth token breaks across lines in the output, rerun the command using the-w0option to remove the line break. For example:# echo -n access_key_id:access_key_secret | base64 -w0 -
Set the Basic auth token as an environment variable by running the following
command:
# export 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_pathWhere the path to the private key file is:
- /opt/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 /opt/aspera/var/aspera_tokenauth_id_rsa -d testfile03 xfer@10.0.3.4/tmp