Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am having trouble getting x window forwarding over ssh to work. Mandrake 9.1 is running on both the server computer and the client laptop I'm using to connect to the server. (It worked out of the box with Mandrake 8.1). I can successfully ssh to the server, and I can start an x application -- that is, when I type xclock, a process id shows up. But the x application does not appear on my local machine (the laptop) and I get the following error message:
Can't open display:[laptop ip address]:10.0
My /etc/ssh/sshd_config file on the server computer contains the following X-related lines:
Protocol 2,1
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes <-- commenting this out seems to make no difference
My /etc/ssh/ssh_config file on the client laptop has the following:
When I echo $DISPLAY on the server, I get
localhost:10.0
But it also doesn't work if I manually set DISPLAY to [laptop ip address]:10.0.
Using xhost + [laptop] doesn't help.
The iptables firewalls on both machines accept all connections from the local network, and the IP addresses in each machines' /etc/hosts files correctly match up.
I have checked the MAN page for SSH to no avail, as well as searched the internet extensively.
Ah, fixed it myself. Turns out I needed to add a rule as the first rule in the OUTPUT chain of iptables on the remote server to allow localhost to connect to localhost as follows:
Also, I needed to let ssh automatically set the DISPLAY environment to localhost:10.0, instead of manually setting it to laptop:10.0, which is probably why I needed the localhost iptables rule above.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.