{"id":5357,"date":"2024-11-11T17:13:05","date_gmt":"2024-11-11T20:13:05","guid":{"rendered":"https:\/\/bureau-it.com\/artigos\/how-to-generate-a-public-key\/"},"modified":"2024-11-11T20:20:48","modified_gmt":"2024-11-11T23:20:48","slug":"how-to-generate-a-public-key","status":"publish","type":"post","link":"https:\/\/bureau-it.com\/en\/artigos\/how-to-generate-a-public-key\/","title":{"rendered":"Complete Guide: How to Generate and Configure Public SSH Keys on macOS, Linux and Windows"},"content":{"rendered":"\n

The public key<\/strong> is a fundamental component in asymmetric cryptography, also known as public key cryptography. In this system, each user has a pair of keys: a public key, which can be shared freely, and a private key, which must be kept secret. The public key is used to encrypt messages or verify digital signatures, while the private key is used to decrypt messages or create digital signatures. <\/p>\n\n

For example, when sending a confidential message, the sender uses the recipient’s public key to encrypt it. Only the recipient, with their corresponding private key, can decrypt and access the contents of the message. <\/p>\n\n

Public key cryptography is widely used in various applications, such as digital certificates, internet security protocols (SSL\/TLS) and digital signatures, guaranteeing the security and integrity of electronically transmitted information. <\/p>\n\n

Here at the Bureau of Technology we use keys mainly to access remote servers using the shell in SSH connections. Below are the instructions for generating a public SSH key on each operating system and then how to make it easier to use on a day-to-day basis to connect to remote servers via the shell: <\/p>\n\n

Generating key pairs<\/h2>\n\n

MacOS and Linux<\/h3>\n\n

Open the terminal and run the following command to generate a key pair:<\/p>\n\n

ssh-keygen -t ed25519 -C \"nome@seudominio.com\"<\/pre>\n\n

Explanation of the parameters:<\/p>\n\n