Transferring from the Command Line through Forward Proxy

Command-line ascp and ascp4 transfers can be run through a forward proxy. The syntax depends on whether proxy authentication is required—that is, whether<server>/<proxy>/<authentication> is set to false. In either case, you are prompted for your password unless the environment variable ASPERA_SCP_PASS=password has already been set. Specify the Proxy port if you are using a port other than the default ports for DNAT and DNATS protocols (ports 9091 and 9092).

Note: If you are transferring with ascp4, the version of ascp4 on the server and on the client must be the same.
  • With no proxy authentication required (<authentication> is set to false in aspera.conf):
    $ ascp options --proxy dnat[s]://proxy_username@proxy_hostname[:port] source_file1[,source_file2,...] username@destHost:target_path
  • With proxy authentication (<authentication> is set to true in aspera.conf):
    $ ascp options --proxy dnat[s]://proxy_username:password@proxy_hostname[:port] source_file1[,source_file2,...] username@dest_hostname:target_path

    If the environment variable ASPERA_PROXY_PASS=proxy_server_password has been set, you do not need to specify the proxy server password.

Examples

  • No proxy authentication required: In the following command the user Sue transfers the file /data/file1 to /Sue_data/ on ihost.com, through the proxy server at phost.com. The username user is necessary but only as a placeholder; it can be anything. No password is required. After running the command, Sue is prompted for the ascp password.
    $ ascp --proxy dnat://user@phost.com /data/file1 Sue@ihost.com:/Sue_data/
  • Proxy authentication required: The following example is the same as above, except that authentication is required. In this case, the proxy user (aspera_proxy) and password (pa33w0rd) are required. After running the command, Sue is prompted for the ascp password.
    $ ascp --proxy dnats://aspera_proxy:pa33w0rd@phost.com /data/file1 Sue@ihost.com:/Sue_data/