Monday, August 29, 2022

[Linux] X11Forwarding : How to use GUI over SSH from a Windows computer?

X11Forwarding on Redhat 8


When you need to execute a Graphic User Interface (GUI) application over SSH such as Oracle Installer, you will need to config X11Forwarding.

In this demo, I use Redhat 8 linux as server, and connect from my laptop running Windows 10.

To make it works, we need to enable X11Forwording at the server side, client side. We also need a program at the client to handle Xwindows. In this article, I will use Xming.





1. Server side: Enable X11forwarding

Enable X11Forwarding in sshd_config file. Change the value from "no" to "yes", then restart sshd.


# cat /etc/ssh/sshd_config | grep X11Forwarding

X11Forwarding yes

# systemctl restart sshd


2. Server side: Install required packages.


There is only one required package to install on the server. However, if you want a program such as "xclock", you can install an additional one.

- Mandatory package: 

yum install xorg-x11-xauth

- Optional package: 

yum install xorg-x11-apps

3. Client side: Install Xming 

Xming is free-opensource. You can download and install from https://sourceforge.net/projects/xming/

After installed, you need to start Xming and see the tray icon like this:

4. Client site: Enable X11Frowaring for your connection.

In this demo, I am using PuTTY. You can find the same option if you use other ssh client tools.

On the PuTTY's new connection, go to Connection\SSH\X11.

Check on "Enable X11forwarding".

In "X display location", input localhost:0.0

Notes that, we use "localhost" instead of you hostname.



So, we are now ready to ssh to server and execute X programs!







No comments:

Post a Comment

Oracle Database 18c Express WITHOUT container database architecture.

Oracle has introduced multitenant architecture from Oracle Database 12c. In Oracle Database 18c Express edition, the CDB database (multiten...