How to Generate a Public/Private Key Pair for Use With Secure Shell Managing Secure Shell Access in Oracle® Solaris 11.2 (2024)

How to Generate a Public/Private Key Pair for Use With Secure Shell

Users must generate a public/private key pair when their site implements host-based authentication or user public-key authentication. For additional options, see the ssh-keygen(1) man page.

Before You Begin

Ask your system administrator whether host-based authentication is configured.

  1. Start the key generation program.
    mySystem% ssh-keygen -t rsaGenerating public/private rsa key pair.…

    where –t is the type of algorithm, either rsa, dsa, or rsa1.

  2. Specify the path to the file that will hold the key.

    By default, the file name id_rsa, which represents an RSA v2 key, appears in parentheses. You can select this file by pressing the Return key or provide an alternative file name.

    Enter file in which to save the key (/home/username/.ssh/id_rsa):<Press Return>

    The file name of the public key is created automatically by appending the string .pub to the name of the private key file.

  3. Type a passphrase for using your key.

    This passphrase is used for encrypting your private key. A null entry is strongly discouraged. Note that the passphrase is not displayed when you type it in.

    Enter passphrase (empty for no passphrase): <Type passphrase>
  4. Retype the passphrase to confirm it.
    Enter same passphrase again: <Type passphrase>Your identification has been saved in /home/username/.ssh/id_rsa.Your public key has been saved in /home/username/.ssh/id_rsa.pub.The key fingerprint is:0e:fb:3d:57:71:73:bf:58:b8:eb:f3:a3:aa:df:e0:d1 username@mySystem
  5. Check that the path to the key file is correct.
    % ls ~/.sshid_rsaid_rsa.pub

    At this point, you have created a public/private key pair.

  6. Log in to the remote host by using the appropriate option based on your network's authentication method.
    • If your administrator has configured host-based authentication, you might need to copy the local host's public key to the remote host.

      You can now log in to the remote host. For details, see How to Log In to a Remote Host With Secure Shell.

      1. Type the following command on one line with no backslash.
        % cat /etc/ssh/ssh_host_dsa_key.pub | ssh RemoteHost \'cat >> ~./ssh/known_hosts && echo "Host key copied"'
      2. When you are prompted, supply your login password.
        Enter password: <Type password>Host key copied%
    • If your site uses user authentication with public keys, populate your authorized_keys file on the remote host.
      1. Copy your public key to the remote host.

        Type the following command on one line with no backslash.

        mySystem% cat $HOME/.ssh/id_rsa.pub | ssh myRemoteHost \'cat >> .ssh/authorized_keys && echo "Key copied"'

        When the file is copied, the message “Key copied” is displayed.

      2. When you are prompted, supply your login password.
        Enter password: Type login passwordKey copiedmySystem%
  7. (Optional) Avoid future prompting for passphrases.

    See How to Reduce Password Prompts in Secure Shell. For more information, see the ssh-agent(1) and ssh-add(1) man pages.

How to Generate a Public/Private Key Pair for Use With Secure Shell 
Managing Secure Shell Access in Oracle® Solaris
11.2 (2024)
Top Articles
Five banks accused of ‘greenwashing’ their activities in Amazon rainforest
Carbonite Support Knowledge Base
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 6468

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.