Closed Captioning Closed captioning available on our YouTube channel

How to use the ssh keygen command: 2-Minute Linux Tips

Network World | Jan 27, 2020

In this Linux tip, learn how to use the ssh-keygen command. It’s used to create a set of public/private keys that you can use in place of passwords to either log into a system or run commands remotely.

Copyright © 2020 IDG Communications, Inc.

Similar
Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at the ssh-keygen command that’s used to create a set of public/private keys that you can use in place of passwords to either log into a system or run commands remotely. The command is used like this:
The -t allows you to specify the type of encryption – dsa or rsa. Notice that you can provide a passphrase to be used or just press the enter key if you want to log in or run commands without a password – which is especially useful in scripts.
Once the keys are generated, you have to copy the public key (e.g., id_rsa.pub) to the other system and account that you want to access.
Once this public key is added to the authorized_keys file on the remote account, you will be able to log from the local account into the remote by using the provided passphrase or no password at all if none were specified when the keys were created.
Try it out:
That’s your Linux tip for using ssh-keygen.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.
Featured videos from IDG.tv