--5

Introduction

SSH stands for Secure Shell and is a method used to establish a secure connection between two computers.

SSH works by authenticating based on a key pair, with a private key being on a remote server and the corresponding public key on a local machine. When the keys match, access is granted to the remote user.

This guide will show you how to generate an SSH key pair in Windows using PuTTY.

Step 1: Install PuTTY

  1. Browse to the developer’s page, and download the installer for PuTTY:

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

  1. Double-click the downloaded file and follow the installation wizard to finish the installation.

On the initial dialog of the installation wizard, click Next.

Select the destination folder. Use the default installation configuration unless you have a specific need to change it. Click Next to move on to the next screen

Select PuTTY product features to be installed. Stick to the defaults if you do not have any specific needs. Click Next to move on to the next screen.

  • Once the process completes, click Finish to exit the installation wizard.

Step 2: Run the PuTTY SSH Key Generator

  1. Press the Windows key.
  2. Type puttygen.
  3. Under Best Match, right-click PuTTYgen.
  4. Click Run as admi Yes on the Do you want to allow this app to make changes to your device? pop-up.

Step 3: Use PuTTY to Create a Pair of SSH Keys

The process outlined below will generate RSA keys, a classic and widely-used type of encryption algorithm. The PuTTY keygen tool offers several other algorithms – DSA, ECDSA, Ed25519, and SSH-1 (RSA).

If you require a different encryption algorithm, select the desired option under the Parameters heading before generating the key pair.

  1. In the PuTTY Key Generatorwindow, click Generate.
  2. Move the cursor around in the gray box to fill up the green bar.
  3. Save the public key:

Click the button labeled Save public key.

Choose a location to save the key.

Give the key a name (e.g., putty_key.pub)

  1. Save the private key:

Click the Conversions menu at the top.

Click Export OpenSSH key.

You’ll be asked if you want to save a key without a passphrase. Click Yes.

Choose a location to save the key (usually the same folder as the public key).

Give the key a name (e.g., putty_key).

Copy Public Key To Server

The OpenSSH public key is located in the box under Key / Public key for pasting info OpenSSH authorized_keys file:. The public key begins with ssh-rsa followed by a string of characters

Highlight entire public key within the PuTTY Key Generator and copy the text.

Launch PuTTY and log into the remote server with your existing user credentials.

Use your preferred text editor to create and/or open the authorized_keys file:

vi ~/.ssh/authorized_keys

Paste the public key into the authorized_keys file.

ssh-rsa

AAAAB3NzaC1yc2EAAAABJQAAAQBp2eUlwvehXTD3xc7jek3y41n9fO0A+TyLqfd5ZAvuqrwNcR2K7UXPVVkFmTZBes3PNnab4UkbFCki23tP6jLzJx/MufHypXprSYF3x4RFh0ZoGtRkr/J8DBKE8UiZIPUeud0bQOXztvP+pVXT+HfSnLdN62lXTxLUp9EBZhe3Eb/5nwFaKNpFg1r5NLIpREU2H6fIepi9z28rbEjDj71Z+GOKDXqYWacpbzyIzcYVrsFq8uqOIEh7QAkR9H0k4lRhKNlIANyGADCMisGWwmIiPJUIRtWkrQjUOvQgrQjtPcofuxKaWaF5NqwKCc5FDVzsysaL5IM9/gij8837QN7z rsa-key-20141103

For F5 the format would be appended with username and host ip as well.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCgaj3hi/0D5szhtzguPJlryqd1bfIrsyIVJs+AP+YlYYcUGCKscTsXCMveiwZUk8IA4Irph8sCukcp2c+mP6T5NU8fRf8m0mlQ+3W1Jwojeq0bbMYfejp2XVizixtUilTfcgkkMzFHOZA3fcDvcAPPF7hXRP8iywtrQGMiilOLg09er3DyLryY72BZ24CNRpu/DnQAOF12BoFYv0pG6aSBAtIL+LJSf/d5OaYp/c3JUiV0YoLpjEPMsiMHVbbTDZu/FFQZfL3myLhet9alknL0r+Q7UvaAfjhFCHjMdpQhCDFOj5fqadO+qOg27EMxV4s5iWE4er4k0fDCBxfqLauh rsa-key-20220323== root@10.1.1.100

  1. Save the file and close the text editor.
  2. Adjust the permissions of the authorized_keysfile so that the file does not allow group writable permissions.

chmod 600 ~/.ssh/authorized_keys

  1. Logout of the remote server.

Connect To Server Using Your SSH Keys

To use your SSH keys, copy your public SSH key to the remote system you want to connect to, in our case it is F5 device. Use your private SSH key on your own system. Your private key will match up with the public key, and grant access.

  1. Enter the remote server Host Name or IP address under Session.
  2. Navigate to Connection > SSH > Auth.
  3. Click Browse… under Authentication parameters / Private key file for authentication.
  4. Locate the putty_key.private.ppk private key and click Open.
  5. Finally, click Open again to log into the remote server with key pair authentication.

You put the username with which you want to connect and device will respond without any password through keys management.

You may download the pdf from below link- ClickHere

We also offer a diverse library of pre-recorded videos for any online training or buy self-paced courses.
Get enrolled now”.

📩 Email:info@netminion.net, netminionsolutions@gmail.com
📞 Helpline: +91-9599857762(IN), + 19024124779 (CA)
🟣 LinkedInhttps://www.linkedin.com/in/netminion-solutions/
🟢 Websitehttps://netminion.net
🟣 Videos Websitehttps://videos.netminion.in
🟢Telegram Channelhttps://t.me/NetMinionSolitionsOffical
🟣 Buy a Rack Rental : https://labs.netminion.net/page/login/index.php

Keep Learning! Keep Growing! Keep investing!

Welcome to NetMinion Solutions, a leading education training institute/company to nurture minds and fostering a passion for learning. No matter if you are a beginner or a professional – our dedicated faculty and state-of-the-art facilities create an enriching environment where you can explore, innovate, and grow exponentially – academically and personally both.

We are committed to practical learning and provide cutting-edge lab solutions, to enhance your learning journey – including CCNA, CCNP & CCIE, data center, Wireless, Cloud, VMware, F5 -LTM, GTM, ASM, APM, Palo Alto, SD-WAN, Checkpoint, ACI and list goes on.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *