Creating a Secure Password free login
Now that we have the key pairing we really don't want users to log in using the password. Why? Well we don't want someone guessing our password and logging in. Now that we validated our key works we are ready to disable the password and enable logins only via a public and private key.
Video Transcript
00:00Okay, let's start with Mac because the Mac version is really easy.
00:03So the way I would log in by Mac is just by literally just by doing what I always do is
00:08just connecting to my demo account.
00:11As soon as I connect to my demo account, it's going to find my private key and the
00:14.ssh folder in my home directory, and it's going to match it up to my public key and
00:19log me in.
00:20That's it.
00:21I don't need a password anymore.
00:22Unless I put a password on my key itself, I'm not going to even be prompted for passwords
00:26anymore.
00:27If I did, then you'll have to put the local password that you put for your key to decrypt
00:31it before the decryption starts.
00:33But if not, that's it.
00:34You're set.
00:35You're logged in.
00:36Now, let's see how to do it on Windows.
00:37If you don't want to see how it's done on Windows, then you could just press on to
00:41the next video.
00:42But let's see how to do it on Windows, which is a little bit more complicated.
00:46What I'm going to do is I'm going to go inside of PuTTY.
00:48And again, I'm just going to put inside here my IP address, which will be 69289595.
00:55By the way, this is my IP, don't put it yourself, put your own IP address.
00:59That's what you want to worry about.
01:00And I'm going to go into the Connections folder.
01:03And I'm just going to search here for my data.
01:06And I'm going to put in the username that I want by default to log in.
01:09And it's going to be demo.
01:11And I'm going to go into the SSH folder up here and open it up and go to the auth
01:17for authorization.
01:18And I'm going to keep the defaults as they are, which is SSH2, which is what we're
01:22working with.
01:23And I'm going to browse for my file, find the private key that I had inside that I saved
01:28in our document earlier.
01:30And I'm going to direct to that private key, add it into the list.
01:34And let me just go back here to the top here.
01:36And I'm going to my sessions and I'm just going to save this session.
01:40So I'm going to give it a name.
01:41So I'm going to call this, let's call this 692895 demo.
01:51And I'm going to save it up here.
01:53Once I save it, let's load it up.
01:56And once I try to log in, it's going to automatically log me in.
01:59It's going to validate my authentication.
02:02And I'm logged in.
02:03So now once I've saved the session, I don't have to type anything anymore.
02:06Again, every time I come in here, I could just automatically go to my PuTTY and double
02:10click on my demo account that I've saved.
02:13And it will log me in.
02:14It's only the first time there's a few more steps involved.
02:17But once you configured it, that's it.
02:18It's just as simple as doing it on a Mac.
02:22So let's continue on and looking into how could we improve the security of our server.
02:27And now we're going to be all inside of our terminal and our Mac.
02:31But the step of logging in, just because it's intuitive, we're not going to go over it
02:35again, unless there's something that is huge that we change.
02:39Then we'll jump into the PC for a second to show you how it's done on the PC.
02:43But for the most part, we're going to be from here on inside of the SSH window itself,
02:50inside of our computer itself.
02:51Alrighty, so let's jump in and you'll see in the next video where we continue talking
02:54about our security.
