Setting up an SSH Key

alt text

SSH is an amazing protocol that allows us to authenticate, log into, and work on remote machines. But trying to remember all the passwords is kind of a pain!

Wouldn't it be great if a machine just trusted you? If you could just log in with no hassle?

Well, your dreams have come true! because with an SSH key you can do just that!

Set up an SSH key on your local machine

I am going to show you how to setup an ssh key on bash (Linux, and Mac)

  1. First from a bash terminal enter this command: ssh-keygen
  2. For your first key just accept the default location.
  3. Next use the ssh-copy-id + the user and machine you are trying to log into for example: ssh-copy-id root@192.168.1.100
  4. You will be prompted to enter your password to the machine, but after that you will be able to log into the machine by simply typing: ssh root@192.168.1.100

And there you have it, not nearly as scary as it sounds to setup. Now I will say this is just the most basic use case. You can get much more detailed with encryption levels, turning off password authentication, etc. But this is enough to get you started!

more ...