Vous êtes sur la page 1sur 3

How to create a private-public key pair

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:

Create a private-public key pair using Backup4all


Create a private-public key pair using Certificate Creation tool
Backup to SFTP server using private key file

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:

1. Open Backup4all
2. Go to Properties (Ctrl+P)->SFTP->Edit configuration
3. Under Private key section, select Key file
4. Press Create key pair button
5. Type a name for the private key file and press Save
6. Enter a password for the private key file and press OK.
7. 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:

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)
 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:

1. Put Makecert.exe application on C: drive.


2. Open a command line window.
3. 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
4. Type a password for the private key.
5. 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.)

6. 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.)
7. Convert .pem to .ppk (PUTTY key format).
To do that, just load top.pem in FileZilla client (go to Edit menu->Settings->Connection-
>SFTP)
8. In freeSSHd server, go to Settings->Authentication
9. Select the Public key authentication and disable all other methods.
10. 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:

1. Open Backup4all, press File->New Backup


2. Press Advanced mode
3. Type a name for your backup job
4. On SFTP server press Edit configuration
5. Enter the SFTP server details
6. Under Private key section, select Key file and choose the private key file you generated.
7. Press OK.
8. Go to Sources page and add the backup sources.
9. On Type page, select the backup type to use.
10. Press Save.
11. In freeSSHd server, go to Settings->Authentication

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)
12. Select the Public key authentication and disable all other methods.
13. Indicate the public key folder and make sure you copy the public key file in that folder.
14. You can now press the Backup button from Backup4all.

Applies to:

Backup4all 4.x or later.

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

Vous aimerez peut-être aussi