X11 Forwarding Problem

 
Thread Tools Search this Thread
Operating Systems Linux Debian X11 Forwarding Problem
# 1  
Old 09-09-2005
X11 Forwarding Problem

I have 2 Debian boxes.

In my ssh.com client and my putty client, I have X11 fowarding turned
on for both boxes.

When I connect one, I can xterm with no problem back to my pc.
On the other, I keep getting:
xterm Xt error: Can't open display:
xterm: DISPLAY is not set


On both machines in the sshd_config I have:
X11Forwarding yes

I just don't understand what I'm doing wrong. Thanks.
# 2  
Old 09-09-2005
A Little More Info Please

You have two Debian boxes. Are they the machines you are connecting to? I am assuming so since you mention Putty (which as far as I know is Windows only although it can run under WINE). What kind of machines are you making the connection from? If you are connecting with Putty under Windows, are you running an Xserver on the Windows box? What you wrote leads me to assume this:

Windows Box 1 (Running Putty) ----------> Debian Box 1

Windows Box 1 (Running Putty) ----------> Debian Box 2


Windows Box 1 (Running SSH.Com) ------> Debian Box 1

Windows Box 1 (Running SSH.Com) ------> Debian Box 2


Is that correct?
# 3  
Old 09-09-2005
I'm sorry about not including more info.

You're assumptions were correct.

I ssh to the debian box with X11 forwarding turned on. On 1 debian
box, xterm (runing xwin/cygwin), it spawns a xterm session on my windoze
box.

I ssh to the 2nd debian box, and it gives the error above.

I've compared both sshd_config's on the debian's boxes together and they are exact. I've tried to set my display, not set my display,etc...
# 4  
Old 09-14-2005
Well...

Hmmm... I'm not sure how you can check this with PuTTY, but it sounds like you might be running Cygwin on your Windows box, so... do you have the Cygwin OpenSSH client installed? If so, try this:

ssh -X debian.box.2

Log in as usual, etc... That should give you an ssh connection with X forwarding enabled (That's the -X). Then try to launch an X app and see if it comes through. If it does, try this at a shell prompt

~#

The '~' is the escape character for OpenSSH and the '#' asks the OpenSSH client to display all forwarded connections in use. You should see something like this:

Code:
$ ~#
The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 fd 4/5)
  #1 x11 (t4 r2 i0/0 o0/0 fd 7/7)

The important part of this is the #1 line. It indicates that X11 forwarding is currently active. It will only display if your X app launches. If your X app doesn't launch, you'll only see the #0 line.

You could also try running your ssh server with the -ddd option in order to take a look at debugging output. What you should do is:

1. Connect to debian box 2 and stop OpenSSH services
2. Manually run sshd as follows:

sshd -ddd

3. You should see a bunch of stuff scroll past you. Attempt to make your connection with whatever SSH client you want to use with X forwarding enabled. Then attempt to launch an X application. The terminal you started sshd in should give you a lot of information which you can post here.

Once you disconnect, the sshd process will die. When it's in debug mode it only allows one connection and then dies, so this is normal. Once you've got a good debug log, just restart your ssh services as normal.

This is assuming you have root access on debian box 2 BTW...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

X11 forwarding doesn't work

hi, I'm trying to run a bash script that starts GUI. Though it says application started when I run this bash script doesn't show up any GUI. Here is what I've tried so far and please let me know if I'm missing something with the X11 set up here. cat /etc/redhat-release Red Hat Enterprise... (8 Replies)
Discussion started by: fop4658
8 Replies

2. UNIX for Beginners Questions & Answers

X11 forwarding issues

Unable to get X11 activated on my login even after Unix admin has enabled it (2 Replies)
Discussion started by: tomsayer1977
2 Replies

3. IP Networking

Force SSH session without/disabling X11 forwarding.

I would like to disable X11 session forcefully. I have tried the following things: 1. Setting appropriate DISPLAY variable in the /etc/environment file to be "0.0" 2. I have tried setting the sshd_config parameter X11Forwarding to be "no" This session communication is happening by exchanging... (2 Replies)
Discussion started by: vaibhavvsk
2 Replies

4. Red Hat

X11 forwarding through a tunnel

Is it possible to launch an X11 application and have it use an X11 server on the other side of a bastion host? Specifically, here's my setup: my laptop ------------- bastion -------------- remote host I have putty installed on my laptop. The bastion is rhel 6.5 and the remote host is... (1 Reply)
Discussion started by: tsreyb
1 Replies

5. UNIX for Dummies Questions & Answers

Problem with X11 Forwarding

Hello. I installed a Debian box, and its installed remotely. I need to boot up iceweasel from there to do a quick test. I log on using: ssh root@<IP> -X I have modified the /etc/ssh/sshd_config file, and added the X11Forwarding yes flag And yet I still get: Error: cannot open... (10 Replies)
Discussion started by: dynelight
10 Replies

6. UNIX for Dummies Questions & Answers

X11 forwarding does not work after networking change

Hi all I'm having an issue with X11 Forwarding I have a VM set up on my computer which I usually "ssh -X" to over a home network (192.168.1.*). Client 192.168.1.100 Server 192.168.1.103 This worked perfectly fine for X11 forwarding. However I am not at home now (and have no access to... (2 Replies)
Discussion started by: grahambo2005
2 Replies

7. HP-UX

'X11 forwarding' SSHD assigns already used port

Hi, We've been facing a strange issue. Clients use X11 forwarding via SSH on HP server and sometimes the same DISPLAY is assigned to two (maybe more) sessions. As a result, some users can't open their applications, and some have their windows redirected to somebody else. It looks as if sshd... (1 Reply)
Discussion started by: piooooter
1 Replies

8. Red Hat

X11 forwarding problem between 2 RHEL4 machines with SSH

X11 forwarding problem between 2 RHEL4 machines with SSH Already configured the following on both machines under /etc/ssh Under sshd_config: UsePAM no AllowTcpForwarding yes Under ssh_config: ForwardAgent yes ForwardX11 yes ForwardX11Trusted yes ----------------------------- Using... (1 Reply)
Discussion started by: panggou
1 Replies

9. UNIX for Dummies Questions & Answers

X11 forwarding not working

Hi, I am using Putty, enabled SSH X11 forwarding and entered the X11 display location as "localhost:0". However I encountered the following error: ------------------------------------ # xclock & 2941 # X connection to localhost:10.0 broken (explicit kill or server shutdown). + Exit 1... (4 Replies)
Discussion started by: panggou
4 Replies

10. OS X (Apple)

ssh forwarding to X11

Hi, I have issues with running graphical interfaces on my computer being remotely logged into a network via the -X option of ssh. My .cshrc shows DISPLAY=hostname:0 and I think there should be a different number instead of the 0. I changed the ssh_config file already to 'X11 forwarding yes', which... (0 Replies)
Discussion started by: ginese
0 Replies
Login or Register to Ask a Question