[No audio]
Here we will access our Linux machine, the
one we installed earlier through our PuTTy client.
Now remember, you have access to a Linux machine.
You could use PuTTy client or you could simply
log in directly to the client so it's really up to you.
So this is the PuTTy client.
Looks like we're going to connect to our Linux machine
which is our first Linux machine through the PuTTy.
Let's go to our Linux machine.
[No audio]
Here, we have our Linux machine, and that's our console.
We log into the console,
[No audio]
and then we open up a terminal.
And that's how we perform most of
our tasks, most of our commands.
Now another way to connect is through the PuTTY.
For that we have to assign an
IP address to this Linux machine.
So what is the IP address
right now. The command to check is ifconfig.
[No audio]
So when we scroll up, you see here
our network adapter is this enp0s3.
But it doesn't have an IP address.
So how do we assign an IP address which
we will go into our Oracle VirtualBox, click
on Setting, and go to Network, change the NAT
to Host-only Adapter,
[No audio]
and click OK.
Once it is saved,
[No audio]
you can simply run ifconfig
command again, and then you scroll up, and you'll see,
right now it still does not have
the ethernet IP address right here.
It should come up somewhere here.
So I think probably the adapter is not up.
So we will have to become root
[No audio]
and type in command ifcfg, sorry ifup,
and the name of the adapter, which is enp0s3.
Once you hit that, it
says, Connection successfully activated.
Let's wait for the prompt.
The prompt came back, hit up arrow
key, and look for ifconfig again.
And this time you see it has an
IP address which is 192.168.56.101.
[No audio]
Now we're going to put in that
IP address in a PuTTy terminal.
Okay, once again, for my Mac users you
do not need to download and install PuTTy.
All you have to do is find your terminal on
your Mac and then simply run the command ssh, lowercase,
-l, username in my case is iafzal, and IP
addresses which is 192.168.56.101, and that's the IP address.
We just looked it up by running
the command ip addre, or ip a.
So use the syntax and you will be able
to connect to Linux machine from your Mac.
Now I'm going back to my
Windows users and using the PuTTy.
So we could use PuTTy to connect to Linux.
[No audio]
192.168.56.101, hit Enter.
Or you could also save the session
saying MyLinuxVM like that.
You could save it this way, next time you
don't have to type in the IP address and
then you click here, and then click Open.
Once it opens, it ask you for a warning sign.
It's going to tell you if you
wanted to keep the SSH keys.
It's just a secure way to
connect to Linux, just click Yes.
It's going to say login as.
Now I'm going to login as myself
iafzal, and you probably have your own account,
login with your own account, hit Enter.
[No audio]
Put the password, and there you go.
This is exactly as if you
are logging in through the GUI.
Now, the reason we need to know how to log
in through the PuTTy is because 98% of the time
when you are going to be working in a corporate
environment, there is no GUI environment where you're going to
come in and login to the GUI.
You're always going to have the PuTTy session where you're
going to put an IP address of the destination server
and then you're going to connect to it.
Now, if you type hostname, you're going
to see your hostname right here.
So this exactly as this one right here.
So in our lessons down, after this
lesson, we're going to be using interchangeably.
Sometimes you're going to be using PuTTy, sometimes you're
going to be logging in as a console.
So it's really doesn't matter where we logging in from.
But you should know both ways how to log in.
[No audio]