So let's dive right in and start with some simple concepts.
Now,
we're all used to logging into apps or
websites by providing a username and a password
logging into a Linux system is pretty much the same.
So there's not much mystery here.
We'll look at four ways to log in
the local text mode, console,
local graphical mode, console,
remote text mode, login
and remote graphical mode, login.
You'll often hear terms like console, virtual terminal and terminal emulator.
And it might be a little hard to understand why they're named this way.
Nowadays,
a console is just a screen where your operating system displays some
text and where it allows you to log in or type commands
and a terminal emulator is nothing more than a graphical app
that runs in a window and does a similar thing.
It shows you text output and allows you to type in commands, things like that.
These terms come from the old days of computing
back in the beginning, computers were incredibly expensive.
So a university or an organization may have only
had one single computer available for the entire building,
but multiple people could connect to it and do their work by using physical devices
that allowed them to type text and commands and also display on a screen.
What's currently happening,
these devices were called consoles or terminals.
So instead of buying 25 super expensive computers,
you could just have one and have 25 people using it with these terminals.
Nowadays,
consoles and terminals and Linux are usually things
that just exists in software rather than hardware.
For example, when you see Linux boot and a bunch of text appears on the screen,
it tells you what happens as the operating system is loading
and that's the console.
Now, after a Linux machine is booted,
if you press control alt and F two on the keyboard,
you'll see a virtual terminal.
Now, if you have Linux installed on your desktop with a graphical user interface,
when you want to type in commands, you open a terminal emulator,
let's move back to logins.
Now, in practice, most often you'll log into remote Linux systems,
but let's start with the less common scenarios.
Now, local is just a fancy word for something that's in front of you or something.
You can physically access
like a computer or a laptop on your desk that's local.
A server running in Google cloud, for instance, is remote.
Now, usually when Linux is installed on servers,
it's installed without the gooey or graphical user interface components,
there's no mouse pointer, no buttons, no windows, no menus, nothing of that sort,
just text
but you might sometimes run across servers that include a gooey.
Now with a gui
logging in is super easy because it's all in your face.
You see a list of users that you can choose from and then type in your user's password.
And don't forget to log out when you finished your work.
If the device has the typical server oriented Linux
OS installed without any gooey components
logging in locally is also easy.
You'll usually see something like this on your screen.
Now, there's no list of users this time,
but you can just type in your username and then your password
note that you won't see your password as you type
when your work is done,
type exit to log out.
Again,
most Linux operating systems running on servers
will have no gooey components installed,
but you'll sometimes run into exceptions,
connecting to a remote server to its graphical
user interface is a little more tricky.
First of all, there's no standard set in stone
whoever configured that server chose their preferred way
of dealing with these remote graphical logins.
They could have chosen to install VNC, a virtual network computing solution.
And in this case,
you need to download the proper B and C client also called VNC viewer to connect to it.
This might be tight B and C or real VNC or something else entirely.
It all depends on the V and C server running
on the remote system and what B and C clients,
your local operating system supports.
Now, if the administrator of that server wanted to let Windows users connect,
for instance,
it might mean that they use a solution
allowing for RDP connections or remote desktop protocol.
This means you can just click on the windows start button
type in remote desktop connection,
open that app and then enter in the username and password that you've been provided.
Whatever it may be connecting to a remote graphical console is pretty easy.
It all boils down to downloading the application that lets you do that
entering the remote system's IP address and
then followed by your username and password.
Initiating a text based remote connection to a Linux system is pretty standard.
That's because almost every Linux server uses the
same tool that allows for remote logins,
the open SSH daemon.
And that's a program that runs in the background on the server all the time
SSH comes from secure shell
until SSH, something called telnet
was the standard.
Now,
telnet was highly insecure as it did not
encrypt the communication between you and the server,
you were connecting to
this meant that anyone on the same network with you could steal your Linux username
and password and see everything you did on that server during your telnet session.
The SSH protocol uses strong encryption to avoid this
and the open SSH daemon is built carefully
to avoid security bugs as much as possible.
Long story short, open SSH is used by millions of servers and it stood the test of time
proving to be very hard to hack
for these reasons.
Everyone happily uses it and trusts that it can do a pretty
good job at only letting authorized people log into their operating systems
while keeping the bad people out
in case you're following along on your virtual machine,
log in locally directly from the virtual
machine window and then enter in this command
IP space A,
you'll see what IP your machine uses.
I've outlined the information we're looking for in yellow.
We'll use this IP in our case 192.168 0.0 0.17
to simulate a situation where we have a server in a remote location.
Now to recap,
we have an SSH daemon running on the server.
This listens for any incoming connections
to be able to connect to this remote SSH demon.
We'll need something called an SSH client.
Yet another program
this client will run on our current laptop or desktop computer.
Now, macOS S and Linux
based operating systems such as
Ubuntu already have an SSH client preinstalled.
So if you're on mac Os or Linux open a terminal emulator window
in the past, if you're running Windows,
you needed to install an SSH client like Putty
on the latest Windows 10 and 11.
This is no longer necessary as an SSH client is also preinstalled.
If you're on windows, click the start menu and type CMD to open up the command prompt
to connect to a remote Linux system through SSH type. The following command
of course,
replace Aaron with the actual username that you created in
your Linux OS that's running in the virtual machine.
Same with the IP address.
Now, from here on out, we'll stay inside this SSH session
to go through all the exercises in the upcoming lessons.
Please join me in the demonstration video to see each of these login methods.
I'll see you there.