And welcome to our first demonstration,
the demonstration where we're going to go through and
check the defaults on our three systems.
So we're going to read those defaults remotely,
we'll show you how that's done,
and we're also going to make sure that we create a standard user
password for our vagrant account on each of our systems.
And here we are, look at this,
the glorious command line environment of our Ubuntu system.
Now I've got all three of my systems up and running.
I've got the Ubuntu, AlmaLinux system, and the openSUSE system up and running.
We're going to be taking a look at how we can connect to different systems,
but we're going to begin by checking to see what
authentication mechanisms are available through SSH.
And we can do this through the standard SSH command line utility,
ssh, and we can use the ‑o to set an option,
and we're using Preferredauthentications=no.
So we're saying I'd like to authenticate,
but I don't want to use any authentication method,
is that going to be okay?
It's going to say no.
So I'm going to begin by connecting through to my AlmaLinux system.
Now these are the IP addresses that I am using.
You, of course, could be using different IP addresses.
We'll talk more about this later,
but we can see the first thing that we're presented with is to
accept the public key of the remote server.
We haven't previously connected to it.
So we can type yes to accept it, and it then copies it down locally.
We can use this for authenticating the server on future attempts.
As we look, though, we can see that permission is denied without authentication,
but we're able to use publickey, a couple of gssapi methods,
and password‑based authentication,
so on this system the weaker password‑based authentication is available.
When I go through and connect to the SUSE system on IP address 12,
again the same thing, we can see having to accept the public key,
but we've got publickey authentication, password‑based authentication,
and keyboard‑interactive.
Keyboard‑interactive is an interesting method.
It allows us to use authenticators and two‑factor authentication
through devices like Google Authenticator.
If we then go through and connect to my localhost,
I'm using its IP address of 13, again accepting the key.
We can see that on this Ubuntu system it's narrowed down and it's
just publickey authentication that is allowed.
Now these are the settings that are default on the
virtual boxes that I am using.
You might find it's different on your own systems.
But we don't need password‑based authentication,
really, when we're using vagrant,
because we have got public keys and we can connect using the vagrant client
and the public key that it's automatically generated.
But for us, we want to make sure that we have got passwords,
and later on we'll be setting password‑based authentication where it's needed.
We want to set up our password‑based authentication so we can
generate our own keys and distribute those keys,
but of course we have to have a mechanism to distribute them.
So we're going to go through and set up the password.
I'm setting out for the vagrant user,
but I'm going to use sudo so I can set a relatively
simple password so that I can remember it.
If I use the passwd command without sudo,
then I'd have to type in my password to meet complexity rules.
So we're going to do this on the three systems just so we
can use password‑based authentication.
It's not ideal, and we'll be turning it off later on all of our systems,
but we just want to look at ways that we can generate keys for ourselves and
distribute those keys so we can use those for authentication.
So, again,
on the openSUSE system I can go through that same
process of setting up the password.
You can see I'm setting it quite simple,
but as I say,
I want to be able to remember this password and be able to type it in.
And then moving through to our AlmaLinux system,
again, finally,
just making sure that we've got a password for our
vagrant user on all of our systems, we can go through and set up the password.
Once this is done, then we're pretty much ready to go with the next steps,
but let's just recap a little of what we've looked at here.
The first was using then the SSH client with our option so
we could query remote systems to see which authentication
mechanisms they supported.
Having done that, we want to use password‑based authentication,
but we need to make sure that we've got a password for our
vagrant account on all three of our systems.
So it seems that we're doing this in a long and awkward way, but we want to look at some of the very basics before we move on.