If you have already generated public-private key pair, provide the Username, Private key, and Passphrase (if applicable) and save the Linux credentials (or) you can follow the steps below to generate the public-private key pair.
Step 1: Generate a pair of keys - a public key and a private key using the command below:
ssh-key -t rsa
Step 2: Specify the location and the file name in the format .ppk or .pem to save the key. In the below examples, keys are generated in the .ppk format.
Example: /home/key.ppk
Step 3: Enter a passphrase or leave it empty. The private key is protected with a passphrase.
Step 4: Then, the private key (.ppk) and public key (.pub) will be saved to the specified location and file.
Example: Your identification has been saved in /home/key.ppk
Your public key has been saved in /home/key.ppk.pub
Step 5: Change the file permissions of the private and public keys using the command below:
chmod 755 <private key file name>
Example: chmod 755 key.ppk
chmod 755 <public key file name>
Example: chmod 755 key.ppk.pub
Step 6: On the target KVM Host, Public-key needs to be kept in a special authorized_keys file containing a list of public keys using the command below:
ssh-copy-id -i <Public-key file name> <username>@<Host IP Address>
Example: ssh-copy-id -i key.ppk.pub admin@192.168.102.11
Step 7: Copy the Private Key file to the backup server using any FTP tools. You now have the Public key on the KVM Host and the Private key on the backup server.