Generate the Public Key to Transfer the File

A public key is placed in an open-access directory for decryption of the digital signature of the sender, the public key of the message recipient encrypts the sender’s message. Also, Public key infrastructure (PKI) produces public and private keys.

Also, a public key is known as asymmetric encryption. It used two separate keys instead of one shared is a public key and a private key. Public key encryption is a vital technology for internet security. The public-key authentication method needs you to copy your public SSH Key to the server's authorized keys file. ssh-keygen is the utility used to generate, manage, and convert authentication keys for SSH Key.
A public key is a security architecture that has been introduced to provide an expanded level of confidence for exchanging information over an increasingly insecure internet. This guide provides the reader with a basic introduction to key terms and concepts used in a public key including Certificates, Keys, and Authorities. It notes the features and services operated by the public key and the techniques involved in public-key cryptography.

What Is Public Key?

A public key is an extensive numerical value that is used to encrypt data. The key can be generated by a software program, but more often, it is provided by a trusted, established authority and made available to everyone through a publicly accessible repository or directory.

A public key is also operated to encrypt a message or check the legitimacy of a digital signature. Private keys are utilized to decrypt messages that were created with the corresponding public key. In different words, a public key is locks up data from unauthorized use, while a private key is used to unlock it

Public keys are unrestricted from a certificate authority, which issues digital certificates that prove the owner's identity and contain the owner's public key. Public keys use an asymmetric algorithm, which pairs the public key with an associated private key. The standard algorithms used to generate public keys are Rivest-Shamir-Adleman, elliptic curve cryptography, and Digital Signature Algorithm.

A public key can be provided to any person with whom an individual wants to communicate, whereas a private key belongs to the individual it was created for and isn't shared. The public key is generally stored on a public key infrastructure server and is operated to encrypt data securely before it is sent over the internet.

How Does Public Key Work?

The two primary types of cryptographic algorithms are symmetric and asymmetric. Symmetric key algorithms are worked by using a single key to encrypt and decrypt information, whereas asymmetric cryptography uses two keys: a public key to encrypt messages and a private key to decode them.

The process for sending and receiving data via asymmetric cryptography typically consists of five steps:

1. Key generation- Each individual generates a public and private key.
2. Key exchange- The sender and recipient exchange public keys.
3. Encryption- The sender's data is encrypted using the recipient's public key.
4. Sending encrypted data- The encrypted data is sent to the recipient.
5. Decryption- The recipient decrypts the message using their own private key.

How to Generate a Public Key?

First, you need to generate the public key to set up in SSH. Just download PuTTY (0.76) and install OpenSSH for windows. It is open-source, and it creates your cmd SSH ready. Follow some steps to install putty-

Step 1- welcome to putty the setup 0.74 wizard release on your computer click the Next button and continue or cancel button to exit the setup.
Step 2- Select the Installation Path.
Step 3- Select the product feature and click on the Install button.
Step 4- Click on a finish to complete the setup and close the dialog box.

After it is installed you can just go ahead and generate your public key if you want to put it on a server. You generate it by running: After that you can just press "Enter", it will automatically assign a name for the key (example:

If you have got git-bash installed (which comes with Git, Github for Windows, or Visual Studio 2015), then that includes ssh-keygen on Windows .


The advantages of PuTTY are the following:

  • PuTTY provides specific features, particularly when working remotely.
  • It is manageable to configure and more stable than other similar programs.
  • As soon as the connection is restored after disconnection, the remote connection can be continued and the file or text transfer can be continued.
  • PuTTY has an easy-to-use graphical user interface.
  • A remote server is a secure terminal configuration that changes are supported by PuTTY.
  • Some terminal control series, such as the Linux console sequence that is not supported by xterm, are supported by PuTTY.


The disadvantages of PuTTY are the following:

  • Only the username in the session can be saved.
  • Interfaces such as WinSCP must be used to transfer non-text files.
  • The PuTTY emulator is not consistent with some Cisco networking supplies.
  • The copy and paste option is disabled when the connection is specified.


In the above article, we are sharing the guidelines to generate the public key to transfer the file. As you can see, it’s very easy to generate public keys these days. I hope it will help you. If you have any queries regarding this key generator then comment on the below section.