A FASP transfer requires two ports; a TCP port and a UDP port; other ports can be involved as well, depending on your setup. When an ascp transfer is started, a SSH connection to ascp is established on the remote location in order to initiate the transfer session. The SSH connection is opened through a TCP port, usually the TCP port of the remote location. This port can be the default SSH port, TCP 22, or another port value if SSH is configured for a different port. By default, ascp assumes that the port will be 22, if this is not the case you can instruct it to use a specific port by means of the option -P, for example you could issue command -P 44002 which would initiate the session through TCP port 44002.
Once the session is successfully initiated the actual FASP data transfer can happen. For this a UDP port is needed. Normally this port would be the default 33001, however, if this port is not available on the remote location ascp needs to be informed of the port value by the use of the option -O, for example, you could issue command -) 44002 which would perform the transfer through UDP port 44002.
Both the SSH and FASP port are configured on the remote location. This document will explain how to set the ports when using the different Aspera APIs.
The Node API allows the user an easy way of setting the ports, the API provides them directly in the response to either /files/upload_setup or /files/download_setup requests. For example, you could simply send the request below and you would receive the information in the return response ('ssh_port' and 'fasp_port').
The FASPManager SDK can have the ports defined; as seen in the Java code below, where the XferParams.tcpPort, and XferParams.udpPort parameters specify the port to use.
XferParams xferParams = new XferParams();
The SOAP API can have the ports defined, as seen in the XML file below, where Order/RemoteLocation/System/Port represents the SSH port and Order/ChannelParameters/Port represents the FASP port.
Aspera Connect 3.0+ using JSON transfer_spec
The Aspera Connect 3.0+ using JSON transfer_spec can have the ports defined; as seen in the JSON below, where the transferSpec.ssh_port and transferSpec.fasp_port parameters specify the port to use.
Aspera Connect 2.7 using FASP URL
The Aspera Connect 2.7 using FASP URL can have the ports defined; as seen in the URL below, where the port after the server address defines the SSH port and the port in the URL parameter 'port' defines the FASP port.