| ascp: Transferring from the Command Line with Ascp |
114
-y {0|1}
If set to "
1
", use the HTTP fallback transfer server when a UDP connection fails. (Default: 0)
Ascp General Examples
Use the following Ascp examples to craft your own transfers.
To describe filepaths, use single-quote (' ') and forward-slashes (/) on all platforms. Avoid the following characters in
filenames:
/ \ " : ' ? > < & * |
•
Fair-policy transfer
Fair-policy transfer with maximum rate 100 Mbps and minimum at 1 Mbps, without encryption, transfer all files
in
\local-dir\files
to 10.0.0.2:
# ascp --policy=fair -l 100m -m 1m /local-dir/files [email protected]:/remote-dir
•
Fixed-policy transfer
Fixed-policy transfer with target rate 100 Mbps, without encryption, transfer all files in
\local-dir\files
to
10.0.0.2:
# ascp -l 100m /local-dir/files [email protected]:/remote-dir
•
Specify UDP port for transfer
Transfer using UDP port 42000:
# ascp -l 100m -O 42000 /local-dir/files [email protected]:/remote-dir
•
Public key authentication
Transfer with public key authentication using the key file
<home dir>/.ssh/aspera_user_1-key
local-dir/files
:
$ ascp -l 10m -i ~/.ssh/aspera_user_1-key local-dir/files [email protected]:/remote-dir
•
Username or filepath contains a space
Enclose the target in double-quotes when spaces are present in the username and remote path:
# ascp -l 100m local-dir/files "User [email protected]:/remote directory"
•
Content is specified in a file pair list
Specify source content to transfer to various destinations in a file pair list. Source content is specified using
the full file or directory path. Destination directories are specified relative to the transfer user's docroot, which
is specified as a "." at the end of the
ascp
command. For example, the following is a simple file pair list,
filepairlist.txt
that lists two source folders,
folder1
and
folder2
, with two destinations,
tmp1
and
tmp2
:
/tmp/folder1
tmp1
/tmp/folder2
tmp2
# ascp --user=user_1 --host=10.0.0.2 --mode=send --file-pair-list=/tmp/
filepairlist.txt .