Lab 8: Intro to SSH
Objective Focus
- Understand and use essential tools
- Access remote systems using SSH
Official RHCSA EX200 Exam Objectives
So, what is SSH?
SSH, aka Secure Shell, is protocol for creating a secure connection between machines.
To connect to a machine using SSH, the target machine needs to be running the OpenSSH server program sshd. Then, we remotely log in to the system using a ssh client program like PuTTY or the using the ssh command.
Now, the target will listen on Port 22, which is a well-known port for ssh, by default. We work on networking topics later in the course, so if the above is fuzzy be sure to review Comptia Network+ topics as well.
RHEL 9 is already running everything you need for ssh by default.
In this lab, we will be “SSH-ing” into our minimal install server.
$ ssh learner@192.168.50.10
To get the IP address of your minimal install, “server2”, we can use command “ip a'.
$ ip a
After getting our IP address for the target maching, we can log in. In the command below, I will be using the IP of server2. This will allow me to connect to server2 from server1.
$ ssh learner@192.168.122.102
First time connection to a machine will prompt you to add it, in this case server2, to list of known hosts.
Enter the password and now, we shoud see our prompt change from learner@server1 to learner@server2
Now we can issue commands to verify we are on server2.
$ whoami
$ hostname
$ pwd
To disconnect from server2, we can type in the “exit” command
$ exit
That is all for lab 8!