Ascp General Examples

Examples of initiating fasp file transfers using the ascp command.

This topic demonstrates the ascp command with the following examples:

  1. Fair-policy transfer, without encryption

    Transfer with fair rate policy, with maximum rate 100 Mbps and minimum at 1 Mbps:

    $ ascp -T --policy=fair -l 100m -m 1m /local-dir/files root@ 
  2. Fixed-policy transfer, without encryption

    Transfer all files in \local-dir\files to with target rate 100 Mbps and encryption OFF:

    $ ascp -T -l 100m /local-dir/files root@ 
  3. Specify a UDP port

    To perform a transfer with UDP port 42000:

    $ ascp -l 100m -O 42000 /local-dir/files user@ 
  4. Authenticate with public key

    To perform a transfer with public key authentication with key file <home dir>/.ssh/asp1-key local-dir/files:

    $ ascp -T -l 10m -i ~/.ssh/asp1-key local-dir/files root@ 
  5. Authenticate with a login that contains space

    Enclose the target in double-quotes when spaces are present in the username and remote path:

    $ ascp -l 100m local-dir/files "User Name@ directory" 
  6. Transfer with a network shared location

    Send files to a network shares location \\\nw-share-dir, through the computer

    $ ascp local-dir/files root@"//" 
  7. Parallel transfer on a multi-core system

    Use parallel transfer on a dual-core system, together transferring at the rate 200Mbps, using UDP ports 33001 and 33002. Two commands are executed in different Terminal windows:

    $ ascp -C 1:2 -O 33001 -l 100m /file root@ &
    $ ascp -C 2:2 -O 33002 -l 100m /file root@ 
  8. Use content protection

    Upload the file space\file to the server with password protection (password: secRet):

    $ set ASPERA_SCP_FILEPASS=secRet ascp -l 10m --file-crypt=encrypt local-dir/file root@

    Download from the server and decrypt while transferring:

    $ set ASPERA_SCP_FILEPASS=secRet ascp -l 10m --file-crypt=decrypt root@  /local-dir

    If the password-protected file is downloaded without descrypting (file1.aspera-env, with aspera-env appended), on the local computer, decrypt the file as file1:

    $ set ASPERA_SCP_FILEPASS=secRet asunprotect -o file1 file1.aspera-env