Create a key pair for your computer.
To log in to other Aspera servers with public key authentication, you can also create key
pairs from the command line. Follow the instructions below.
-
Create an .ssh folder in the home directory
Create a .ssh folder in your user account's home directory if it doesn't already
exist:
> md <path-to-user-home-dir>.ssh
Navigate into the .ssh folder and continue:
> cd <path-to-user-home-dir>.ssh
-
Use ssh-keygen to generate SSH key
Execute the following command in the .ssh folder. The program will prompt you the key
pair's file name; 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
-
Retrieve the public key file
When created, the key pair is placed in your home directory's .ssh folder (assuming
you generated the key with the default name id_rsa):
(user's home directory)\id_rsa.pub
Provide the public key file (e.g. id_rsa.pub) to your server administrator, so that
it can be set up for your server connection.
-
Use the key in an async session.
Usage within an async session (option -i
keyfile, instead of -w
password) is as follows:
>async -N TestBackup -d c:/tmp/dir -r user@server:d:/tmp/dir -i PATH_TO_THE_PRIVATE_KEY_FILE
Note:
Your private key and public key must be located in the same directory.