September 25, 2023
September 25, 2023

How to Create and Copy SSH Keys with 2 Simple Commands

Advertisements


SSH keys provide a secure and convenient way to authenticate remote servers. In this step-by-step tutorial, Jack Wallen explains how to easily create and copy SSH keys.

If you frequently access remote servers with the help of Secure Shell, I highly recommend you use SSH key authentication for heightened security. For those who’ve never used SSH keys before, I’m here to show you just how easy it is.

And if your admins have set up the servers you need to access for SSH key authentication, you’ll want to take care of this right away. After all, they could configure those servers to no longer accept password authentication, which means you could find yourself without access. So, how do you create the required SSH keys and copy them to the server? It’s actually very simple. Here’s how.

  1. Open a terminal window on the machine you’ll use to access the servers.
  2. Create your SSH keys with the command
  3. ssh-keygen
  4. You will be required to select a directory to house the keys; I suggest accepting the default.
  5. Type and verify a password for the key pair. Now you’re ready to copy your new key to the server.
  6. Let’s say that the server is at IP address 192.168.1.62. To copy the key, issue the command
  7. ssh-copy-id 192.168.1.62
  8. If you’ve never used SSH to access that server, you’ll first be prompted to type yes to continue.
  9. You will be prompted to type the remote user’s password.
  10. With the key copied, you can test the connection by using SSH to connect, where you’ll be prompted to type your SSH key password and not your user password.

Congratulations! You just set up SSH key authentication so you can more securely connect to your remote servers.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.



Source link

61 Bridge Street
Kingdon
Herts
Top locations – from restaurants and clubs, to galleries, famous places Local Business Directory - Events - Jobs - Classifieds and so much more...
© 2023 All Rights Reserved By StepInto Group Ltd
crossmenu