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)
- First from a bash terminal enter this command:
- For your first key just accept the default location.
- Next use the
ssh-copy-id+ the user and machine you are trying to log into for example:
- 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:
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 ...