How configure X11 Forwarding in CentOS/RHEL 6/7

Thanks to Techoism

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.

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&

OR

# xeyes&

xeyes

Enjoy it!

Advertisements

Hi All, I like to spend time on black and white screen with linux. I love to learn new things in linux specially in virtualization. Currently I am working on OpenStack like to dig deep.

Posted in Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: