[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#366355: This may be caused by incorrect display number selection



Looks like I've faced something similar to this bug, and seems that it is 
caused by incorrect choice of dispaly number by remote sshd.

Look:

nikita@bliss:~> ssh -X sercond
No mail.
nikita@sercond:~> echo $DISPLAY
localhost:10.0
nikita@sercond:~> xterm
xterm Xt error: Can't open display: localhost:10.0

However, at this point there already exists an ssh connection to 'sercond' 
host from different host, with X11 forwarding enabled, that uses display 
10!

nikita@bliss:~> ssh -x sercond
No mail.
nikita@sercond:~> echo $DISPLAY

nikita@sercond:~> sudo netstat -lapn | grep 6010
tcp        0      0 127.0.0.1:6010          127.0.0.1:57566         
ESTABLISHED1096/sshd: nikita@n
tcp        0      0 127.0.0.1:57566         127.0.0.1:6010          
ESTABLISHED1099/kmix

So for unknown reason, new ssh connection to sercond does not detect 
that :0 is already in use there. So running X client actually tries to 
connect to different display, and that connections is naturaly rejected.

If I connect one more connection with -X from 'bliss' to 'sercond', while 
keeping older -X connection active, new connection gets dispaly 11, and X 
forwarding works.

I was able to reproduce problem from clear.
- shutdown all ssh connections
- try to connect from 'bliss' to 'sercond', X11 forwadring works
- shutdown connection from 'bliss' to 'sercond'
- set up connection from 'blacky' to 'sercond'
- try to connect rom 'bliss' to 'sercond' once more - X11 forwarding does 
not work, because it tries to use display 10 on 'sercond' that is already 
occupied by connection from 'blacky'.

blacky has:
ii  libx11-6       6.9.0.dfsg.1-6
ii  openssh-client 4.2p1-8 
ii  openssh-server 4.2p1-8

bliss has:
ii  libx11-6       1.0.0-6
ii  openssh-client 4.2p1-8
ii  openssh-server 4.2p1-8

sercond has:
ii  libx11-6       6.9.0.dfsg.1-4
ii  openssh-client 4.2p1-8
ii  openssh-server 4.2p1-8

Attachment: pgpXjKKEzCCrW.pgp
Description: PGP signature


Reply to: