Which command is used to create a new public/private key pair with SSH?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command used to create a new public/private key pair with SSH is ssh-keygen. This utility is specifically designed for generating encryption keys that can be utilized for secure communications via the SSH protocol. When executed, ssh-keygen prompts the user for various parameters, such as the desired file location to save the key pair and an optional passphrase for added security.

The other options serve different purposes in relation to SSH. For instance, ssh-add is utilized to add private keys to the SSH authentication agent, which allows for easier management of multiple keys but does not create a new key pair. ssh-copy-id is a command used to install a public key on a remote machine's authorization list, facilitating passwordless login but not generating a new key. Lastly, ssh-generate is not a standard command in SSH. Therefore, the only option that correctly identifies the tool for generating a new public/private key pair is ssh-keygen.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy