Access Remote Servers from Linux (ssh, vncviewer)
This article covers accessing remote servers from Linux, with specific reference to the information needed for the RHCSA EX200 and RHCE EX300 certification exams.
Remember, the exams are hands-on, so it doesn’t matter which method you use to achieve the result, so long as the end product is correct.
The basic command for connecting via SSH is shown below.
# ssh user@host # ssh firstname.lastname@example.org
If a non default port has been used, the port can be specified with the “-p” flag.
# ssh -p 1234 user@host # ssh -p 1234 email@example.com
The “-X” option enables X11 forwarding from the remote server to your local X server. That way GUI tool like “Firewall Configuration” (
system-config-firewall) can be initiated on the remote server, but run on the local X server.
# ssh -X user@host # ssh -X firstname.lastname@example.org
The “/etc/ssh/sshd_config” file can be used to control the SSH connections to the server. The
DenyGroups entries block specific users and groups from accessing the servers using SSH. Wildcards can be used. When these entries are used it is assumed all other users are allowed access.
DenyUsers joe jayne h* DenyGroups developers test*
AllowGroups entries list those users and groups that can access the system via SSH. When these entries are used, it is assumed that all users and groups not listed are denied access.
AllowUsers joe jayne h* AllowGroups developers test*
The procedure for configuring a VNC server on RHEL6 is discussed here.
Once your VNC server is configured, you can connect to it from any VNC client. On Linux this will often be TigerVNC, installed using the following command.
# yum install tigervnc
Connect to a VNC server using the following command.
# vncviewer machine-name:port # vncviewer maggie.localdomain:3 # vncviewer 192.168.0.4:3
For more information see:
Leave a comment