How configure X11 Forwarding in CentOS/RHEL 6/7

X11 forwarding refers to executing such a program remotely through an SSH (Secure Shell) connection. It’s mean the executable file itself is hosted on a different machine than where the graphical interface is being displayed. The graphical windows are forwarded to your local machine through the SSH connection.

X11 Forwarding

Step 1: Install Required Packages

First install the required packages using below command.

# yum install -y xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps

Step 2: Enable X11 Fowarding

After installing the required packages enable the X11 from ssh configuration file.

# vim /etc/ssh/sshd_config

Uncomment or add the below lines.

X11Forwarding yes

Step 3: Restart SSH Service

Once the config file’s modifications have been made to your Linux system, the SSH service will need to be restarted to effect the revised configuration.

For CentOS/RHEL 7
# systemctl restart sshd
For CentOS/RHEL 6
# service sshd restart

Step 4: Test Connection

Now verify the connection using below command.

Access Putty
Enable X11 in Putty, before login.

Enable X11

Run below command to test the connection.

# xclock&

xclock

OR

# xeyes&

xeyes

Enjoy it!

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.