-
Story
-
Resolution: Done
-
Minor
-
None
-
CL110 - RHOSP16.1-en-2-20210428
-
None
-
7
-
en-US (English)
URL: https://rol.redhat.com/rol/app/courses/cl110-16.1/pages/ch07s05
Reporter RHNID: hchauhan@redhat.com
Section: 5 - Managing Secure Instance Access
Language: en-US (English)||||||||
Workaround:
Description: https://rol.redhat.com/rol/app/courses/cl110-16.1/pages/ch07s05
In the explanatory section of ch07s05 (Managing Secure Instance Access), under the heading of "Managing Key Pairs" it is mentioned as:
"You can use the ssh-keygen command to recreate a public key from an existing private key file. This command uses the private key as input and sends the public key to standard output; the public key is created using redirection.
And command suggested for that is:
[user@demo ~(user)]$ ssh-keygen -f ~/.ssh/private-key.pem > ~/.ssh/public-key.pub"
Instead, we could use:
$ ssh-keygen -y -f ~/.ssh/private-key.pem > ~/.ssh/public-key.pub
without -y, it generates a new public/private pair and override the existing keys and by adding -y option it reads a private OpenSSH format file and print an OpenSSH public key to stdout.