Tools

Converting OpenSSH and PuTTY style keys

Converting OpenSSH and PuTTY style keys

First published date

11/29/2018 10:40 PM

Last published date

11/29/2018 10:40 PM

Overview

With SSH Keys, Two common formats are available - OpenSSH and PuTTY style keys.

Programs that rely on PuTTY cannot use OpenSSH style keys, and vice versa.

Product section

Serv-U Managed File Transfer & Serv-U FTP Server

Resolution

Serv-U uses OpenSSH style keys only, and does not support PuTTY. It can be necessary to convert key formats in order to support specific clients.

Serv-U supports the Public Key Authentication method of user authentication, allowing users to authenticate with a key pair instead of a password. This eliminates the viability of dictionary attacks against user accounts, and also eases the process of automating transfer jobs with Linux/UNIX shell scripts.

While the data stored in Public/Private Key pairs is standardized, the storage format is not. Two common formats are available - OpenSSH and PuTTY style keys. Programs that rely on PuTTY cannot use OpenSSH style keys, and vice versa. Serv-U uses OpenSSH style keys only, and does not support PuTTY. It may therefore be necessary to convert key formats in order to support specifc clients. A procedure to do this isdescribed below:
 

OpenSSH to PuTTY Conversion 

Converting OpenSSH style keys requires the PuTTYgen (© 2019 PuTTY, available at https://www.chiark.greenend.org.uk, obtained on January 22, 2019) application. Once this application is downloaded, start the program, then follow these steps:

  1. Click "Conversions" and then "Import" 
  2. Select your OpenSSH private key (e.g., "user17_sftpkey.key")
  3. If there needs to be a passphrase to secure this key:
    1. Enter the passphrase in the "Key passphrase" and "Confirm passphrase" fields.
    2. Go to File, and click "Save private key" to save the key to disk in PuTTY format (as a .ppk file)

 

PuTTY to OpenSSH Conversion

Converting PuTTY style keys to OpenSSH also requires the PuTTYgen application. Once this application is downloaded, start the program, and follow these steps:

  1. Click the "Load" button for "Load an existing private key file".

  1. Click "Conversions", then "Export OpenSSH key" 
  2. Provide a name in the format mykeyname.key - the file name can be anything but it should end in .key.

See Also: 

Screenshots property of © 2018 PuTTY

Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.