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@10.0.0.2:/remote-dir 
  2. Fixed-policy transfer, without encryption

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

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

    To perform a transfer with UDP port 42000:

    $ ascp -l 100m -O 42000 /local-dir/files user@10.0.0.2:/remote-dir 
  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@10.0.0.2:/remote-dir 
  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@10.0.0.2:/remote directory" 
  6. Transfer with a network shared location

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

    $ ascp local-dir/files root@10.0.0.2:"//1.2.3.4/nw-share-dir/" 
  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@10.0.0.2:/remote-dir &
    $ ascp -C 2:2 -O 33002 -l 100m /file root@10.0.0.2:/remote-dir 
  8. Use content protection

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

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

    Download from the server 10.0.0.2 and decrypt while transferring:

    $ set ASPERA_SCP_FILEPASS=secRet ascp -l 10m --file-crypt=decrypt root@10.0.0.2:/remote-dir  /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