technology articles business management businesses Marketing sales Technology Business finance Lean Manufacturing small business Investing articles employee health

How do I generate a SSH public key

computerinternal65286488.jpg

If you are looking at accessing a computer over a secure channel you may need to generate a SSH public key. SSH uses a private/public key pair for identification purposes. The key pair is generated on your local machine or the client while the public key is then copied to the remote server or the host. The use of a SSH public key is a very secure way of administering a server.

Since SSH public keys are a good idea for security how then do you generate a SSH public key?
Here are some basic direction on how to generate a SSH public key.

-

  • Download and install PuTTY or PuTTY gen. This is a free implementation that is needed to generate your SSH public key in both the Windows operating system and Unix platforms. You can find PuTTY on the internet and then following the directions for downloading.

  • - Next you need to open the PuTTYgen application.

  • - Click generate when prompted.

  • - Move your mouse around to create a random key.

  • - The keys have now been created.

  • - After the keys are created you will now need to think of a passphrase that you will need to remember every time you use your private key. Enter this key passphrase into the two fields.

  • - Click on Save Public Key and save it in a file for future reference. For best results you may want to name the file mypublickey or something easily remembered. Click on Save Private Key and save that somewhere too. Again, name the file something easily remembered.


Once your public and private keys are generated you will need to install the public key onto your server. The public key can be given out to whoever needs it. However, your private key should be just that, private. When you saved your private key it was saved as a file you can run. Open the file for your public key and it will ask for the key passphrase that you thought of and entered in those two fields earlier.

After your public key has been installed on the server you need to access you can then open your private key on your computer. Enter your passphrase when prompted. Your key is now running and you can connect immediately using PuTTY or another program like SecureCRT that is made for using your SSH public keys.

Here is how to create a SSH public key with SecureCRT which is a stand-alone SSH client much like PuTTY:

-

  • Hit the Tools menu then Create Public Key. This option will lead to the wizard to help you create your SSH public key.

  • - Select RSA as the key type. Enter the passphrase you wish to use in order to protect your private key.

  • - Allow SecureCRT to save the key and you will need to note the location for future reference.

  • - The prompt will ask if you want to use this as your global Public Key and you can say yes.

  • Here is how to generate the SSH public keys you need while on a linux desktop or workstation:

  • - In a local shell you must generate your keys.This should be done on your machine as a normal user.

  • ssh-keygen -q -t rsa -f $HOME/.ssh/id_rsa -C your_key_name_here

  • - Replace your_key_name_here with your key name of choice. It should have no spaces but can be anything you want and easily remembered.

  • - You will be asked for a passphrase in a prompt. Enter a sentence that is at least 10-15 words long and that you will remember.

  • - You will be prompted to re-enter the passphrase again.

  • - Now go back to the shell prompt.

  • - Go to ~/.ssh/ and see the files there
:
id_rsa
id_rsa.pub
known_hosts

FREE: Get More Leads!
How To Get More LeadsSubscribe to our free newsletter and get our "How To Get More Leads" course free via email. Just enter your first name and email address below to subscribe.
First Name *
Email *


Get More Business Info
Sponsored Links
Recent Articles

Categories

Copyright 2003-2020 by BusinessKnowledgeSource.com - All Rights Reserved
Privacy Policy, Terms of Use