1

I've read similar questions, and have applied the suggestions posted, but none seem to fix my issue...

In Putty, I've enabled x11 forwarding, with the 'X display location' set to 0.0

The remote Debian 8.4's X -version is 1.16.4, with the the /etc/ssh/ssh_config set to:

 ForwardX11 yes
 ForwardX11 Trusted yes

and /etc/ssh/sshd_config:

 X11Forwarding yes

I've also forced the DISPLAY variable to point to my local machine's IP:

 export DISPLAY=192.168.1.140:0.0

and verified it's set correctly (using 'echo $DISPLAY')

Finally, I restarted: 'service ssh restart' and 'service sshd restart'. Unfortunately, when I enter 'xterm&', I get the error "Can't open display: %s", and the locally running xming (Win8) never shows anything.

The Xming log seems to show an authentication error:

 winClipboardProc - Hello
 DetectUnicodeSupport - Windows Vista
 winClipboardProc - DISPLAY=127.0.0.1:0.0
 winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
 winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
 winClipboardProc - XOpenDisplay () returned and successfully opened the display.
 AUDIT: Mon Jul 04 09:40:48 2016: 2508 C:\Program Files (x86)\Xming\Xming.exe: client 4 rejected from IP 192.168.1.151 

 [Note: the 192.168.1.151 is the IP of the BBB (ifconfig -a)]

I also verified that the Window's firewall is NOT blocking xming.

Not sure if it's significant, but the remote debian is running on a beaglebone black.

ben
  • 473
  • 2
  • 9
  • 21

4 Answers4

1

You shouldn't point the DISPLAY variable to your own machine. Rather, SSH will tunnel the connection from the remote machine through its connection to the local machine. When you login with Putty/SSH it will setup a DISPLAY variable:

$ echo $DISPLAY
localhost:10.0

xterm will connect to this 'local' display, which is really your xming server, securely forwarded through SSH connection.

JvO
  • 3,036
  • 2
  • 17
  • 32
  • Originally, I hadn't exported DISPLAY at all, but when it didn't work, I then tried setting it to my xming's IP. But even setting it to localhost (export DISPLAY=localhost:10.0), I still see the 'Can't open display: %s" on the remote machine. Interestingly, though I don't see the rejected message in xming's log. Could this be an issue with the /etc/hosts file or ~/.Xauthority? – ben Jul 05 '16 at 01:30
  • It could be that the forwarding isn't working (thus, the connection attempt never reaches your local machine). /etc/hosts has nothing to do with this, .Xauthority might. On Linux I often use the '-Y' option for X forwarding, which is the trusted X11 option; try with the ForwardX11Trusted directive off. – JvO Jul 05 '16 at 08:51
  • As another data point, I tried using a local virtual (linux) machine to connect to the remote and it worked (ssh -X root@192.168.1.151). I got an error saying file /root/.Xauthority does not exist, but I was still able to ssh over to it , execute xterm, and the gui showed up. Maybe this missing file is causing the windows host issue? BTW, the only account I have on the remote is 'root', i.e. no other user accounts. – ben Jul 06 '16 at 05:13
1

MOBAXTERM!

After trying everything I could find on the subject, nothing worked getting x11 forwarding from debian 8.4 to xming (win8).. I ran the mobaxterm exe and it worked instantly! It also looks to have have a nice gui interface for file operations.

(Note, I read hummingbird exceed might also work, but I didn't try it)

ben
  • 473
  • 2
  • 9
  • 21
-1

After I used Xshell with Xmanager in properties -> sub properties choose mode X11 forwarding. The, open display xclock with display java for Websphere.

Adriaan
  • 17,741
  • 7
  • 42
  • 75
Richbest
  • 151
  • 10
-1

Please use Xmanager Enterprise for display example xclock Please do the next step:

  1. Click Xmanager Enterprise/ Click File /Properties/Click SSH/ Tunneling
  2. Click X11 Forwarding/ Click Forward X11 connection to: Xmanager
  3. Test use xclock
ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
Richbest
  • 151
  • 10