Software >> Services >> SSH >> How to enable X forwarding on your SSH session


## SSH Client side
1.  Putty
2.  Xming


## SSH Server side
1.  Linux e.g. Amazon Linux, RHEL, Centos
2.  OpenSSH
3.  Xauth


## if Xauth is not installed, install first

yum install xorg-x11-xauth


## install x windows applications for testing

yum install xclock xterm


## SSH Server side configuration

ensure X11Forwarding is set to yes

[root@ip-172-26-13-200 ~]# grep ^X11 /etc/ssh/sshd_config
X11Forwarding yes

## Note that the X11 display offset for OpenSSH is by default 10,
## it is not necessary to set X11DisplayOffset if you want to use 10
## The reason for this offset is
## X11DisplayOffset
##         Specifies the first display number available for sshd(8)'s X11
##         forwarding.  This prevents sshd from interfering with real X11
##         servers.  The default is 10.

This is the display at the SSHD server, the setting may be different at the SSH client (X11 server)


## SSH Client side configuration, check your Xming server's settings by running XLaunch (Start -> Xlaunch)



Take note of the display number for the X-windows server (Xming) running at the SSH Client side

Use the same display number for the X-forwarding setting in your SSH Client e.g. putty