LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 06-22-2005, 05:41 PM   #1
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Rep: Reputation: 30
help for setting up X server to use ssh


I used ssh -X root@IP where "IP" is the ip address of my FC3 machine.
When i tried to open xemacs or things like that, i got this error message:

_X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known X server not responding: "localhost:10.0"

If after login I do "echo $DISPLAY", it shows me "localhost:10.0".
I also tried "setenv DISPLAY" to $HOST's value, then I got this:
"X server not responding"

My local system is Debian where I am just a normal user, but I don't
think this is the reason. I could use "ssh -X" to a remote UNIX machine
and open up X successfully. So what shall I do in the FC3 machine?

Thanks very much for your advice!
 
Old 06-22-2005, 06:25 PM   #2
Jaxn
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Can you ping to localhost? (try 'ping localhost' and 'ping 127.0.0.1')
Should not be any problems with firewalls, I think.

Check also if localhost is in /etc/hosts and has right IP-number (127.0.0.1).

Good luck
 
Old 06-23-2005, 02:48 PM   #3
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
I did this and then it worked :-)
setenv DISPLAY 127.0.0.1:10.0

Thanks for your reply.
 
Old 02-21-2006, 10:34 PM   #4
narender@saineni.net
LQ Newbie
 
Registered: Feb 2006
Location: Hyderabad, India
Distribution: Red Hat 10
Posts: 2

Rep: Reputation: 0
It worked for me too

This worked for me too.

Thank you

and what is this 6010
and server id 10

and how does one automatically get the display to the clien m/c ( client in the noraml sense) without giving the client ip address to the linux server ( server in the noraml sense, not x server )m/c.



Narender
 
Old 02-22-2006, 12:24 AM   #5
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 48
Quote:
Originally Posted by parv
I used ssh -X root@IP where "IP" is the ip address of my FC3 machine.
When i tried to open xemacs or things like that, i got this error message:

_X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known X server not responding: "localhost:10.0"
There might be some settings somewhere that makes it hard to do X forwarding for root. I don't remember. Do you really need to log in as root? Also, try using "-Y" instead of "-X" because many things don't work with "-X".

Quote:
Originally Posted by narender@saineni.net
and what is this 6010
and server id 10
X uses port 6000 + display number, so display 10 would be on port 6010. X has multiple displays.

Quote:
Originally Posted by narender@saineni.net
and how does one automatically get the display to the clien m/c ( client in the noraml sense) without giving the client ip address to the linux server ( server in the noraml sense, not x server )m/c.
When you tell SSH to do X forwarding, it makes a new X display on the remote computer and listens on that port (port 6010 in this case) and then forwards the port (tunnelled through the SSH connection) to the local DISPLAY port. So the remote machine doesn't "know" the local machine's IP at all, SSH just forwards all the information through the connection.
 
Old 02-23-2006, 08:38 PM   #6
Jaxn
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Sorry, I didn't notied it.
Parv:
You should NEVER EVER login as root.
You should REALY REALY use sudo(1) or su(1) when you need to run one command whith root priv:s

Might be that ssh(1) is doing the right thing and don't let you use X11 over ssh as root. It's becouse it has some potetial risk of local cracking and through your computer taking controll over the other computer as you.
Not very nice, any way. Havent got time to check out what is the problem though.

So please set up sudo and use that, so wi dont end up as MS Windows with lots of cracked and zommbied linux boxes...
 
Old 02-25-2008, 03:54 AM   #7
tomrosenfeld
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Rep: Reputation: 0
You should not have to explicitly set DISPLAY after an 'ssh -X'
I had the same problem on one machine and the problem was that /etc/hosts was corrupted. make sure you have the line:
127.0.0.1 localhost.localdomain localhost

also if you are using DNS/LDAP/NIS/YP etc. to resolve hosts make sure that "files" still appears 1st in the list of hosts in /etc/nsswitch.conf.

e.g.:
hosts: files dns


-tom
 
Old 02-25-2008, 09:51 AM   #8
Jaxn
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Also check that /etc/ssh/sshd.conf allows X11 tunneling/forwarding.
You also need the xauth command on your server (and client). If not, sshd at the server (and ssh command) will not be able to transfer and set X11 security token (X11 server "password") to your real X11-server to the "virtual" X11-server on you server. And then X11 will not allow you to connect to your real X11-server from your server, becouse it doesnt have right X11 security token.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
help with setting up login to server remotely using ssh LAdProg2005 Linux - Software 2 10-05-2005 01:05 PM
Does anyone have a guide for setting up SSH.Proxy server? martinj Linux - Networking 2 06-18-2005 02:39 AM
Setting up ssh simeandrews Mandriva 8 03-22-2005 05:10 PM
Setting up a SSH server Rob2105 Linux - Networking 8 03-17-2004 08:45 AM
Setting up an SSH server alany Linux - General 6 11-29-2002 06:49 PM


All times are GMT -5. The time now is 11:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration