LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-23-2008, 07:20 PM   #1
Passions
LQ Newbie
 
Registered: Mar 2007
Distribution: RHEL 5.1
Posts: 20

Rep: Reputation: 0
After ssh'ing to self machine, unable to display xclock???


When I'm on a machine let's say called host1, I can enter:
Code:
xclock -display host1:0.0
and xclock will display on the local machine.

After I ssh to the same machine and enter the password (we have software that ssh's to itself)
Code:
ssh host1
<password>
 xclock -display host1:0.0

I get an error:
Code:
Xlib: connection to "host1:0.0" refused by server. 
Xlib: No protocol specified
Error: Can't open display: host1:0.0
I tried deleting the user's .ICEAuthority and .Xauthority files, logged out, logged in. It recreated them, but still same error.

I know "xhost +" would work and I tried it, but I'd like to avoid it since the security holes.

I also created a new user and tried sshing to myself and it works! I'm just wondering how I can fix this particular user's problem. It has to do something with the user's NFS mounted home directory, right? Some files must be corrupted.
 
Old 02-24-2008, 04:34 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Have you tried using ssh's -X option (ssh -X host1)? It (X11 forwarding) is also present in gui clients (putty for example).

The -X option (see man page) is a way of enabling X11 forwarding without the need of xhost, export DISPLAY, etc.

Hope this helps.
 
Old 02-24-2008, 11:02 AM   #3
Passions
LQ Newbie
 
Registered: Mar 2007
Distribution: RHEL 5.1
Posts: 20

Original Poster
Rep: Reputation: 0
Yes, I tried ssh with -X option. It doesn't work either. Still the Xlib errors.

This is really bizarre how I can do it with another user. I'm thinking it has to do something with the home directory files. argggghghghgh.
 
Old 02-25-2008, 03:25 PM   #4
Passions
LQ Newbie
 
Registered: Mar 2007
Distribution: RHEL 5.1
Posts: 20

Original Poster
Rep: Reputation: 0
I solved my problem. Apparently if the user's home directory is set to 775, it causes this issue. If you chmod to 700, it works without the errors.
 
Old 02-25-2008, 04:12 PM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The .ssh directory needs 700, otherwise ssh won't accept the files that are there. If your machine is setup correctly you don't have to change the homedir (and all subdirs) to 700, only the .ssh dir.
 
  


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'ing an xbox kybishop Linux - Networking 8 01-26-2007 03:08 PM
Unable to use wget and unable to ping machine from external source grunshaw Linux - Networking 3 10-24-2006 08:46 AM
SSH'ing between two computers through a router kz26 Linux - Networking 6 08-14-2005 11:09 PM
Display of Unix Machine on a PCQ Linux Machine gopalkasat Linux - Networking 1 12-14-2004 02:37 AM
ssh'ing to hostname hagbardc Linux - Software 4 06-21-2003 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:25 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