Summary
This article explains how to create a private-public key pair. Private-public key cryptography is a relatively new cryptographic approach whose distinguishing characteristic is the use of asymmetric key algorithms instead of symmetric key algorithms.
On this page:
Details
Every digital certificate has a pair of associated cryptographic keys. This pair of keys consists of a private key and a public key.
A public key is part of the owner's digital certificate and is available for anyone to use. A private key, however, is protected by and available only to the owner of the key. This limited access ensures that communications that use the key are kept secure.
Create a private-public key pair using Backup4all
Follow these steps to create a private-public key pair using Backup4all:
- Open Backup4all
- Go to Properties (Ctrl+P)->SFTP->Edit configuration
- Under Private key section, select Key file
- Press Create key pair button
- Type a name for the private key file and press Save
- Enter a password for the private key file and press OK.
- You can see the generated key files (both private and public) in the location specified.
Create a private-public key pair using Certificate Creation tool
The Certificate Creation tool generates X.509 certificates. It creates a public and private key pair for digital signatures and stores it in a certificate file. This tool also associates the key pair with a specified publisher's name.
The applications required in this section:
- Makecert.exe can be downloaded from: http://msdn.microsoft.com/en-us/library/bfsktky3%28VS.80%29.aspx
- Pvk.exe can be downloaded from http://www.drh-consultancy.demon.co.uk/pvktool.zip
- Ssh-keygen (which is part of openssh) can be downloaded from http://www.openssh.com
- FileZilla can be downloaded from http://filezilla-project.org/download.php
- FreeSSHd can be downloaded from http://www.freesshd.com
Follow these steps to create a private-public key pair using Certificate Creation tool:
- Put Makecert.exe application on C: drive.
- Open a command line window.
- Type C:\makecert -r -n "CN=Top" -sv D:\top.pvk D:\top.cer This will create two files on your D: drive: top.pvk and top.cer
- Type a password for the private key.
- Put the pvk.exe file on D: drive. Use pvk.exe to convert .pvk file to .pem format
Type in command line: D:\pvk.exe -in top.pvk -out top.pem
(You will be asked to type the password before conversion.)
- Use ssh-keygen to extract the public key and save it in RFC 4716 format
Type in command line D:\ssh-keygen -e -f D:\top.pem > D:\top.pub
(You will be asked to type the password before extraction.)
- Convert .pem to .ppk (PUTTY key format).
To do that, just load top.pem in FileZilla client (go to Edit menu->Settings->Connection->SFTP)
- In freeSSHd server, go to Settings->Authentication
- Select the Public key authentication and disable all other methods.
- Indicate the public key folder and make sure you copy the top.pub file in that folder.
Backup to SFTP server using private key file
To make a backup to SFTP server with Backup4all, please follow these steps:
- Open Backup4all, press File->New Backup
- Press Advanced mode
- Type a name for your backup job
- On SFTP server press Edit configuration
- Enter the SFTP server details
- Under Private key section, select Key file and choose the private key file you generated.
- Press OK.
- Go to Sources page and add the backup sources.
- On Type page, select the backup type to use.
- Press Save.
- In freeSSHd server, go to Settings->Authentication
- Select the Public key authentication and disable all other methods.
- Indicate the public key folder and make sure you copy the public key file in that folder.
- You can now press the Backup button from Backup4all.
Applies to:
Backup4all 4.x or later.