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.

Subscribe to the Cybersecurity Insider Newsletter

Strengthen your organization's IT security defenses by keeping abreast of the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday

Subscribe to the Cybersecurity Insider Newsletter

Strengthen your organization's IT security defenses by keeping abreast of the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday