Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X-11 Forward with SSH br0ken
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bufobufo
n00b
n00b


Joined: 10 Jul 2005
Posts: 6

PostPosted: Sun May 28, 2006 11:46 pm    Post subject: X-11 Forward with SSH br0ken Reply with quote

Hello,
i have little problem with my X-11 Forwarding and i dont have any ideas, where is the problem.

I am running cygwin with X-term on host machine. Output:
Code:

debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: x11_get_proto: /usr/X11R6/bin/xauth -f /tmp/ssh-JljeMW8820/xauthfile generate :0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200 2>/dev/null
debug2: x11_get_proto: /usr/X11R6/bin/xauth -f /tmp/ssh-JljeMW8820/xauthfile list :0.0 . 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 0
debug3: tty_make_modes: ospeed 38400
debug3: tty_make_modes: ispeed 38400
debug3: tty_make_modes: 1 3
debug3: tty_make_modes: 2 28
debug3: tty_make_modes: 3 8
debug3: tty_make_modes: 4 21
debug3: tty_make_modes: 5 4
debug3: tty_make_modes: 6 0
debug3: tty_make_modes: 7 0
debug3: tty_make_modes: 8 17
debug3: tty_make_modes: 9 19
debug3: tty_make_modes: 10 26
debug3: tty_make_modes: 12 18
debug3: tty_make_modes: 13 23
debug3: tty_make_modes: 14 22
debug3: tty_make_modes: 18 15
debug3: tty_make_modes: 30 0
debug3: tty_make_modes: 31 0
debug3: tty_make_modes: 32 0
debug3: tty_make_modes: 33 0
debug3: tty_make_modes: 34 0
debug3: tty_make_modes: 35 0
debug3: tty_make_modes: 36 1
debug3: tty_make_modes: 37 0
debug3: tty_make_modes: 38 1
debug3: tty_make_modes: 39 0
debug3: tty_make_modes: 40 0
debug3: tty_make_modes: 41 0
debug3: tty_make_modes: 50 1
debug3: tty_make_modes: 51 1
debug3: tty_make_modes: 53 1
debug3: tty_make_modes: 54 1
debug3: tty_make_modes: 55 1
debug3: tty_make_modes: 56 0
debug3: tty_make_modes: 57 0
debug3: tty_make_modes: 58 0
debug3: tty_make_modes: 59 1
debug3: tty_make_modes: 60 1
debug3: tty_make_modes: 61 1
debug3: tty_make_modes: 70 1
debug3: tty_make_modes: 71 0
debug3: tty_make_modes: 72 1
debug3: tty_make_modes: 73 0
debug3: tty_make_modes: 74 0
debug3: tty_make_modes: 75 0
debug3: tty_make_modes: 90 1
debug3: tty_make_modes: 91 1
debug3: tty_make_modes: 92 0
debug3: tty_make_modes: 93 0
debug2: channel 0: request shell confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
Last login: Sat May 27 22:42:02 2006 from 10.0.0.1

When i try to run gimp i receive following:
Code:

foo@bar ~ $ gimp
_X11TransSocketINETConnect() can't get address for localhost:6011: Name or service not known
GIMP could not initialize the graphical user interface.
Make sure a proper setup for your display environment exists.

and echo of $DISPLAY:
Code:

foo@bar ~ $ echo $DISPLAY
localhost:11.0

and my sshd_config on server, on which i connect to:
Code:

Port 22
PermitRootLogin no
IgnoreRhosts yes
X11Forwarding yes
TCPKeepAlive yes
ClientAliveInterval 43200
Subsystem       sftp    /usr/lib/misc/sftp-server

Do you have any ideas, what is wrong?
The $DISPLAY seems really strange, but i dont have any ideas, why it is setuped to 11.0
I have removed PAM following this tutorial: http://gentoo-wiki.com/HOWTO_Remove_PAM
Thx for any suggestions
(and sry for my english)
Back to top
View user's profile Send private message
Eskarel
Apprentice
Apprentice


Joined: 07 May 2004
Posts: 257
Location: Perth Australia

PostPosted: Sun May 28, 2006 11:59 pm    Post subject: Reply with quote

Have you added the remote system to your xhost?

xhost +ip number
Back to top
View user's profile Send private message
bufobufo
n00b
n00b


Joined: 10 Jul 2005
Posts: 6

PostPosted: Mon May 29, 2006 12:27 am    Post subject: Reply with quote

Eskarel wrote:
Have you added the remote system to your xhost?

xhost +ip number

no, but now when i tried it, i have received:
Code:

Last login: Mon May 29 01:35:57 2006 from 10.0.0.1
foo@bar ~ $ xhost +
_X11TransSocketINETConnect() can't get address for localhost:6011: Name or service not known
xhost:  unable to open display "localhost:11.0"

foo@bar ~ $ export DISPLAY=:0.0
foo@bar ~ $ xhost +
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xhost:  unable to open display ":0.0


EDIT: i dont understand, why the DISPLAY is setuped to "localhost:11.0"
Back to top
View user's profile Send private message
Jfr0
n00b
n00b


Joined: 19 Dec 2005
Posts: 72

PostPosted: Mon May 29, 2006 3:27 pm    Post subject: Reply with quote

You started the Xserver on the cygwin machine ? I think you mihgt have to ssh -X from cygwin to get x forwarding to work.
Back to top
View user's profile Send private message
bufobufo
n00b
n00b


Joined: 10 Jul 2005
Posts: 6

PostPosted: Mon May 29, 2006 5:38 pm    Post subject: Reply with quote

Jfr0 wrote:
You started the Xserver on the cygwin machine ? I think you mihgt have to ssh -X from cygwin to get x forwarding to work.

yes, offcourse.. i have an xterm started from cygwin, then i have ssh -XC to my home server, then i try to forward gimp
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Mon May 29, 2006 8:06 pm    Post subject: Reply with quote

bufobufo wrote:

no, but now when i tried it, i have received:
[code]
Last login: Mon May 29 01:35:57 2006 from 10.0.0.1
foo@bar ~ $ xhost +
_X11TransSocketINETConnect() can't get address for localhost:6011: Name or service not known
xhost: unable to open display "localhost:11.0"


You need to run this command on your local machine before you log into the remote system. It tells your local machine to accept X connections from other systems, otherwise your local system rejects the connection.

bufobufo wrote:

EDIT: i dont understand, why the DISPLAY is setuped to "localhost:11.0"


This is normal and is configurable on the X client (remote) side in the /etc/ssh/sshd_config file. The variable is X11DisplayOffset and it defaults to 10. Each new session will increment that number. :0.0 is the id of the first X session started on a box. This is normally the local GUI running on the machine. SSH starts its sessions up at 10 so as not to interfere with these local sessions.


troymc
Back to top
View user's profile Send private message
bufobufo
n00b
n00b


Joined: 10 Jul 2005
Posts: 6

PostPosted: Wed May 31, 2006 2:25 am    Post subject: Reply with quote

troymc wrote:

You need to run this command on your local machine before you log into the remote system. It tells your local machine to accept X connections from other systems, otherwise your local system rejects the connection.


yes, i have tried too.. but no effect :-/ i still receive:
Make sure a proper setup for your display environment exists.

troymc wrote:

This is normal and is configurable on the X client (remote) side in the /etc/ssh/sshd_config file. The variable is X11DisplayOffset and it defaults to 10. Each new session will increment that number. :0.0 is the id of the first X session started on a box. This is normally the local GUI running on the machine. SSH starts its sessions up at 10 so as not to interfere with these local sessions.
troymc

thx for explanation
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Wed May 31, 2006 2:51 am    Post subject: Reply with quote

hmm....Ok, so try something like this:

Code:

local $ xhost +
access control disabled, clients can connect from any host
local $ ssh remote
Password:
Last login: Tue May 30 21:25:22 2006
remote $ echo $DISPLAY
localhost:10.0
remote $ xterm &
[1] 28657
remote $


and a terminal window should open.


troymc
Back to top
View user's profile Send private message
bufobufo
n00b
n00b


Joined: 10 Jul 2005
Posts: 6

PostPosted: Wed May 31, 2006 4:06 am    Post subject: Reply with quote

troymc wrote:
hmm....Ok, so try something like this:

Code:

local $ xhost +
access control disabled, clients can connect from any host
local $ ssh remote
Password:
Last login: Tue May 30 21:25:22 2006
remote $ echo $DISPLAY
localhost:10.0
remote $ xterm &
[1] 28657
remote $


and a terminal window should open.


troymc

Do you have a X-session running on remote?
When i tried this before (now i have X server broken in cygwin :-/ ), i have retrieving still the same error. The $DISPLAY was containing :
localhost:11.0

EDIT: on remote i have an x session running (its my home computer), so maybe this is the reason why the $DISPLAY contains the 11.0 instead of 10.0... but i am not sure, if its ok. I have fealing, that some months ago, the $DISPLAY was containing localhost:10.0 (when it worked)
P.S.: sorry for my english
Back to top
View user's profile Send private message
Romeriz
n00b
n00b


Joined: 04 Sep 2002
Posts: 11

PostPosted: Sat Dec 30, 2006 6:09 pm    Post subject: Solution Reply with quote

Hello all,

I know this is very late :) but it might help someone in the future. I had this issue and all it came down to was in my /etc/hosts file I did not have a localhost definition.

ie:

127.0.0.1 localhost



Hope this helps someone in the future.

Regards

Romeriz
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum