Creating SSH Keys (Command Line)

Create a key pair for your computer.

To log in into other Aspera servers with public key authentication, you can also create key-pairs in command line. Follow these instructions:

Note: You can also use the application GUI to create SSH keys or import existing keys for use with a selected user account. For instructions, see Creating SSH Keys.
  1. Create a .ssh directory in your home directory if it does not already exist:
    $ mkdir /home/username/.ssh

    Go to the .ssh folder and continue:

  2. Run ssh-keygen to generate an SSH key-pair.

    Run the following command in the .ssh folder. The program prompts you for the key-pair's filename. Press ENTER to use the default name id_rsa. For a passphrase, you can either enter a password, or press return twice to leave it blank:

    $ ssh-keygen -t rsa
    Note: When you run ascp in FIPS mode (that is, <fips_enabled> is set to true in aspera.conf), and you use passphrase-protected SSH keys, you must either (1) use keys generated by running ssh-keygen in a FIPS-enabled system, or (2) convert existing keys to a FIPS-compatible format using a command such as the following:
    openssl pkcs8 -topk8 -v2 aes128 -in id_rsa -out new-id_rsa
  3. Retrieve the public key file.

    When created, the key-pair can be found in your home directory's .ssh folder (assuming you generated the key with the default name id_rsa):


    Provide the public key file (for example, to your server administrator, so that it can be set up for your server connection.

  4. Start a transfer using public key authentication with the ascp command.

    To transfer files using public key authentication on the command line, use the option -i private_key_file. For example:

    $ ascp -T -l 10M -m 1M  -i ~/.ssh/id_rsa  myfile.txt  jane@

    In this example, you are connecting to the server (, directory /space) with the user account jane and the private key ~/.ssh/id_rsa.