# problems with X11 forwarding



## Business_Woman (Dec 2, 2008)

Hi,

This is pretty straight forward, im having trouble getting X11 forwarding to work. I have set the correct parameters in sshd_config and ssh_config respectively. But it still won't forward the session. I have also tried setting the DISPLAY variable to the connecting ip. But still no luck. What am i doing wrong?


----------



## Djn (Dec 2, 2008)

Have you tried both the -X and -Y flags to ssh?


----------



## ale (Dec 2, 2008)

Did you run _xhost_(1)?


----------



## Business_Woman (Dec 2, 2008)

ale said:
			
		

> Did you run _xhost_(1)?



I did.

When connecting the echo $DISPLAY shows localhost:10.0

shouldn't that be 0.0 ?


----------



## Djn (Dec 2, 2008)

On the remote computer? Nah, 10:0 looks right, since sshd is intended to listen to a display that isn't already in use.


----------



## kamikaze (Dec 2, 2008)

That depends if you want to use an encrypted connection you use _ssh -X_ and that should do everything you need. SSH creates a tunnel and pretends to the software that it's displayed locally (that's why localhost:10.0).

An unencrypted connection is a lot faster, but should only occur in a trusted environment. For that you set DISPLAY to <XServerIP>:0.0 and run _xhost +<XClientIP>_ on the XServer.

The _xhost_ command can actually be used in a much more fine grained way, but when security is an issue it _ssh_ should be used any way.


----------



## Business_Woman (Dec 2, 2008)

okay, it seems to work reasonably well after all. The only thing that isn't forwarded properly is the fluxbox session. I wonder if that requires any fluxbox tweaking...

_Edit_ IT seems to work if you connect when X is not running and then start it


----------

