Skip to content
Home » AIX » How AIX Enable X11 Forwarding

How AIX Enable X11 Forwarding

X11 Forwarding

I found only a few clients (X server) can display xclock over SSH.

[root@primary01 /]# export DISPLAY=10.1.1.37:0.0
[root@primary01 /]# echo $DISPLAY
10.1.1.37:0.0
[root@primary01 /]# xclock
Call xclock in AIX 7.2
Call xclock in AIX 7.2

Some other clients can't.

[root@primary01 /]# export DISPLAY=10.2.1.82:0.0
[root@primary01 /]# echo $DISPLAY
10.2.1.82:0.0
[root@primary01 /]# xclock
Error: Can't open display: 10.2.1.82:0.0

After a while, it shows "Error: Can't open display".

Error: Can't open display

To solve the situation, I open X11Forwarding attribute in /etc/ssh/sshd_config.

[root@primary01 /]# vi /etc/ssh/sshd_config
...
#X11Forwarding no
X11Forwarding yes

Then restart the daemon.

[root@primary01 /]# stopsrc -s sshd
[root@primary01 /]# startsrc -s sshd

Now, we make a test from a X server, e.g. MobaXterm.

➤ ssh -X -v [email protected]
...
debug1: Requesting X11 forwarding with authentication spoofing.
...

You can see some X11 forwarding info.

[root@primary01 /]# xclock
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 32782
debug1: channel 1: new [x11]
debug1: confirm x11
debug1: channel 1: FORCE input drain
debug1: channel 1: free: x11, nchannels 2

We can see the clock now.

Leave a Reply

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