LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2003, 08:28 AM   #1
amocjr
Member
 
Registered: Aug 2003
Location: Connecticut
Distribution: Mandrake, Debian
Posts: 39

Rep: Reputation: 15
Question Forwarding X Windows over SSH (Mandrake 9.1)


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:

Host *
ForwardAgent yes
ForwardX11 yes
Protocol 2,1

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.

Any help would be appreciated.

Thanks.
 
Old 08-17-2003, 11:55 AM   #2
amocjr
Member
 
Registered: Aug 2003
Location: Connecticut
Distribution: Mandrake, Debian
Posts: 39

Original Poster
Rep: Reputation: 15
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:

iptables -I OUTPUT 1 -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT


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.

I hope others may benefit from my mistakes.

Last edited by amocjr; 08-17-2003 at 12:00 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH X forwarding krusty_lab AIX 10 01-02-2008 09:36 AM
X forwarding via SSH bd1308 Linux - Software 4 08-30-2005 07:13 PM
SSH, forwarding native windows apps to linux. alunduil Linux - General 4 07-02-2005 01:10 PM
SSH access to windows from mandrake Dillius Linux - Networking 1 02-17-2005 12:29 AM
cant SSH into mandrake router from windows xp pragmatic Linux - Newbie 3 04-10-2004 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration