Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
vbalko-claimate
Contributor
4,003

 

Introduction

In today’s digital landscape, protecting sensitive information from evolving threats is crucial, whether transferring files or connecting to remote servers. If you are interested in learning more about security practices in cloud services like SAP BTP, Microsoft Azure, and SAP Cloud Integration, you can find information, blogs, and the latest trends on our website at www.claimate.tech. Sophisticated cyberattacks, like man-in-the-middle and brute-force attacks, make strong security practices essential for maintaining data integrity and confidentiality. Two essential tools for enhancing digital security are SSH keys and PGP keys. SSH keys are primarily used for establishing secure connections to servers, such as when accessing cloud services or managing remote infrastructure. PGP keys, on the other hand, are used for encrypting messages and files, such as securing email communications or protecting sensitive business documents, to ensure confidentiality. In this post, This guide will provide the steps to generate SSH keys using PuTTYgen and PGP keys using Kleopatra. It is particularly useful for developers, system administrators, or anyone deeply interested in cybersecurity

Why Are SSH and PGP Keys Important?

SSH keys provide a secure method for authenticating to remote servers without relying on passwords. For example, SSH keys are commonly used when accessing cloud servers or managing remote development environments. Unlike traditional password authentication, SSH keys use cryptographic pairs — a public key stored on the server and a private key kept by the user. This ensures a much stronger layer of security because an attacker would need access to the private key to gain access, making it highly resistant to brute-force attacks. This method is not only more secure but also reduces the risk of brute-force attacks. If you are deploying applications or managing servers, using SSH keys is a reliable way to secure access to those systems.

PGP keys, on the other hand, are used to encrypt sensitive data. PGP (Pretty Good Privacy) ensures that only the intended recipient can decrypt and read your data. This is particularly important for protecting personal data, sensitive business information, or any data transferred over potentially insecure channels.

Generating SSH Keys Using PuTTYgen

You can generate SSH keys easily using PuTTYgen, which is part of the PuTTY suite. Below are the steps to generate an SSH key pair:

Download and Open PuTTYgen

Start by downloading PuTTY from the official website.

Once installed, open PuTTYgen.

Configure Key Settings

Under “Type of key to generate”, select “RSA”.

Set the “Number of bits in a generated key” to 4096 for increased security.

A higher bit number means that the key is more resistant to brute-force attacks, making it significantly harder for an attacker to crack.

Generate the Key

Click on “Generate”. You will be prompted to move your mouse randomly over the blank area to generate entropy, which enhances the randomness of the key.

Convert the Key to Different Formats

After saving the private key in .ppk format, it may need to be converted to other formats, such as OpenSSH or PEM, for compatibility with different systems. For example, PEM is often used for web services and certain cloud providers, while OpenSSH is the standard format for most Linux servers.

To convert the .ppk key to OpenSSH format, reopen PuTTYgen, click on "Conversions" in the menu, then select "Export OpenSSH key". Save the resulting key file.

If a PEM file is needed for use with certain services, select “Export OpenSSH key” and ensure the key file has a .pem extension.

Save the Keys

Once the key is generated, save the public key to a file and the private key using the “Save private key” button. Adding a passphrase is recommended for additional security.

Generating PGP Keys Using Kleopatra

PGP keys can be generated using Kleopatra, which is part of the Gpg4win package. Kleopatra provides an intuitive interface for generating, managing, and sharing PGP keys.

Install and Open Kleopatra

Download Gpg4win, which includes Kleopatra, from here. Install the package and open Kleopatra.

Create a New Key Pair

Click on “New Certificate” to create a new key pair.

Choose “Create a personal OpenPGP key pair”. Enter your name and email address for key identification.

Set Key Preferences

Select RSA and set the key size to 4096 bits for enhanced security.

Optionally, choose an expiration date, typically between 1–2 years.

Generate and Save Your Key Pair

Follow the prompts to generate the key. You will be asked to enter a passphrase to secure the private key.

Once generated, export the public key to share with others, which can be used for encrypting messages or verifying signatures.

Conclusion

SSH and PGP keys are fundamental tools for anyone concerned with privacy and security in the digital world. SSH keys allow secure connections to servers without relying on passwords, while PGP keys are used to encrypt sensitive messages and files to ensure that only the intended recipient can access them. By following these steps, you can generate your own keys and start securing communications and server connections effectively. For more insights into cloud integration, SAP BTP, and securing cloud environments using tools like SSH and PGP, visit our website at www.claimate.tech for information, blogs, and the latest trends.

Although working with cryptographic keys might initially seem challenging, once accustomed to the process, these tools become powerful assets in safeguarding data.

Did you find the steps clear? Have you encountered any issues while generating your keys? Feel free to share your thoughts or questions in the comments below!

DISCLAIMER: You can find this article also on my other blog https://medium.com/@vbalko/a-simple-guide-to-creating-ssh-and-pgp-keys-with-puttygen-and-kleopatra-0...

 

1 Comment
peter_munt4
Participant
0 Kudos

Hi

is this for a PGP key that would be used when a file is obtained via the SFTP adapter?

The SAP Help say to ONLY use gpg4win VERSION 2.3.4 to Create PGP Keys

as that SAP Help also says Kleopatra is deselected

and does SAP Note  SAP Note 3276828

Could you please clarify?

 

Labels in this area