The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Debian
.
google unix.com



Debian Debian GNU/Linux is a free distribution of the GNU/Linux operating system.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
X11 forwarding problem between 2 RHEL4 machines with SSH panggou Red Hat 1 02-27-2006 03:10 AM
X11 forwarding not working panggou UNIX for Dummies Questions & Answers 4 01-11-2006 12:25 AM
ssh forwarding to X11 ginese OS X (Apple) 0 02-25-2005 11:53 PM
Email forwarding ? Help ! sai UNIX for Dummies Questions & Answers 8 10-22-2004 10:00 AM
ip forwarding win2khater IP Networking 1 11-13-2003 10:04 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-09-2005
natter natter is offline
Registered User
  
 

Join Date: Oct 2001
Location: Denver
Posts: 25
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 (permalink)  
Old 09-09-2005
deckard's Avatar
deckard deckard is offline
Registered User
  
 

Join Date: Jul 2002
Location: Ohio
Posts: 135
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 (permalink)  
Old 09-09-2005
natter natter is offline
Registered User
  
 

Join Date: Oct 2001
Location: Denver
Posts: 25
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 (permalink)  
Old 09-14-2005
deckard's Avatar
deckard deckard is offline
Registered User
  
 

Join Date: Jul 2002
Location: Ohio
Posts: 135
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...
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0