Stephen Liu wrote:
Hi MAL and folks,

<snip>


On Gentoo box
===========
As USER ***

$ ssh -X [EMAIL PROTECTED]
[EMAIL PROTECTED]'s password:
-bash-2.05b$ konqueror
konqueror: cannot connect to X server

Firstly, something you should understand. There are two ways to do what you are attempting, and it seems that you're trying them both at once.


To get machine A's X programs to display on machine B, you can either:

One:

1) On machine A, type:
xhost +
1) SSH from machine A to machine B:
ssh [EMAIL PROTECTED]
2) On machine B, type:
export DISPLAY="machineA:0.0"
3) On machine B, run an X program:
xterm
4) Providing there is no firewall on machine A, the program should appear on machine A's desktop.


(don't forget to run xhost - on machine A after).

Two:

1) On machine B, make sure you have "X11Forwarding yes" in your /etc/ssh/sshd_config file. If not, add it and restart SSHD:
/etc/init.d/sshd restart
2) SSH from machine A to machine B, using the -X switch:
ssh -X [EMAIL PROTECTED]
3) On machine B, run an X program:
xterm
4) It should appear on machine A, even if a firewall is running on machine A (and blocking everything but SSH).


It works even if there is a firewall, because machine B is not making any connections to machine A. Instead, it is connecting to itself, where an SSH tunnel is waiting to take the data back to machine A.
You can check that this tunnel is set up correctly by typing the following on machine B, after SSHing to it with -X :


export | grep DISPLAY

You should see:

declare -x DISPLAY="localhost:10.0"

Hope that helps,
MAL


-- [EMAIL PROTECTED] mailing list



Reply via email to