A quick solution is to install ascli, as Ben mentioned.
(See ENA ref: https://ena-docs.readthedocs.io/en/latest/retrieval/file-download.html#using-aspera)
Then, after installation (for example, install Ruby, then aspera-cli gem, then ascli conf ascp install:
You can get the required password like this: ascli conf ascp info --fields=uuid --show-secrets=yes
and set that password in env var: ASPERA_SCP_PASS
Alternatively, use the password-less version of the RSA key like this:
ascp -T -l 300m -P 33001 -i ~/.aspera/sdk/aspera_bypass_dsa.pem era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/ERR164/ERR164407/ERR164407.fastq.gz ./
(Note the changed path to key, the path can be displayed with : ascli conf ascp info --fields=ssh_private_rsa)
Alternatively, take advantage to use ascli directly:
ascli server --url=ssh://fasp.sra.ebi.ac.uk:33001 --username=era-fasp --ssh-keys=~/.aspera/sdk/aspera_bypass_rsa.pem download vol1/fastq/ERR164/ERR164407/ERR164407.fastq.gz --ts.target_rate_kbps=300000
You can even configure as default server:
ascli conf preset update ena --url=ssh://fasp.sra.ebi.ac.uk:33001 --username=era-fasp --ssh-keys=~/.aspera/sdk/aspera_bypass_rsa.pem
ascli conf preset set default server ena
and then browse:
ascli server br /
and download:
ascli server download vol1/fastq/ERR164/ERR164407/ERR164407.fastq.gz --ts.target_rate_kbps=300000 --to-folder=.
I recommend not to use option -T (equivalent to --ts.cipher=none), transfer options can be displayed with: ascli conf ascp spec
Regards