New Contributor
Posts: 1
Registered: ‎02-13-2019

ssh private key generate throgh root access



i have seen the CDH documentation for configuration of certificate where they are saying to generate the private key from JAVA Keytool but i can also create the private key from root access in server. so, both key will be same or different?

Posts: 1,825
Kudos: 406
Solutions: 292
Registered: ‎07-31-2013

Re: ssh private key generate throgh root access

The Java provided 'keytool' utility helps you generate a certificate pair and also store it into a JavaKeyStore (JKS) container format which the JVMs will expect it to be in. This is one reason why the documentation suggests to use it, as it reduces steps.

You can certainly generate your cert. pair without using Java's 'keytool' utility (such as via openssl commands, etc.), and just use the utility to copy the existing certificates into a JKS container format file for JVMs to use. This is equally acceptable too.

The 'root access' part of your question is a little confusing, so perhaps I've not gotten your problem right. You do not normally require root level privileges to create a certificate (although you may need it to alter existing, OS-supplied stores).