Linux Professional Institute LPIC-1 Exam 101
GNU and Unix Commands
Work on the Command Line Part 1 Log into remote and graphical consoles demo
In this tutorial, you will learn how to:
- Perform a local graphical login on a CentOS VM
- Connect remotely via Remote Desktop Protocol (RDP)
- Access the shell in text mode using SSH
Table of Contents
- Local Graphical Login on CentOS
- Remote Graphical Login via RDP
- Text-Mode Login via SSH
- Summary and References
Local Graphical Login on CentOS
First, verify that your CentOS VM is set to boot into the graphical target with GNOME installed:
sudo dnf groupinstall "Server with GUI"
sudo systemctl set-default graphical.target
sudo reboot
Note
If the VM defaults to text mode, start the graphical login with sudo systemctl start gdm
or install the necessary GNOME packages.
Once the GNOME login screen appears:
- Select your username.
- Enter your password.
- Click Sign In.
After GNOME loads, use the top-right menu to log out and prepare for the remote login demonstration.
Remote Graphical Login via RDP
To enable RDP access on a CentOS server, install and configure the xrdp service:
sudo dnf install xrdp
sudo systemctl enable --now xrdp
sudo firewall-cmd --add-service=rdp --permanent
sudo firewall-cmd --reload
Warning
Exposing RDP (port 3389) on public networks may introduce security vulnerabilities. Use a VPN or SSH tunnel when possible.
Next, open your preferred RDP client (e.g., Microsoft Remote Desktop) and enter the server’s IP address:
- Launch the RDP client application.
- Input the IP address (for example,
192.168.0.18
) and click Connect. - At the login prompt, the username field may auto-fill with
student
. Enter the password and proceed.
Once authenticated, verify the connection by checking the IP address in the RDP window’s title bar. Then, navigate to Activities → GNOME Terminal to open a terminal session.
Text-Mode Login via SSH
From the GNOME Terminal in the RDP session, initiate an SSH connection to your CentOS VM at 192.168.0.17
with the aaron
account:
[student@LFCS-CentOS2 ~]$ ssh [email protected]
[email protected]'s password:
Activate the web console with: systemctl enable --now cockpit.socket
Last login: Tue Oct 19 04:22:38 2021
[aaron@LFCS-CentOS ~]$ exit
logout
Connection to 192.168.0.17 closed.
[student@LFCS-CentOS2 ~]$
When finished, close the terminal emulator and end your RDP session.
Summary and References
This lesson covered three login methods for CentOS:
Login Method | Description | How to Access |
---|---|---|
Local GUI | GNOME desktop on local VM | Select user → Enter password |
Remote GUI (RDP) | GNOME desktop via RDP client | Use RDP client → Connect → Login |
SSH Text Mode | Command-line interface over SSH | ssh user@host |
Further reading:
Watch Video
Watch video content