Solved

X forwarding and ssh

Posted on 1998-06-16
3
294 Views
Last Modified: 2010-04-21
How would I go about forwarding an X11 program to an arbitrary host while using ssh?  

Here's an example:
Bob sshs into host#1(172.17.1.97).   I'm on host#2 and I want to send a display to him.  So I type xterm -display 172.17.1.97:0.0

It works fine if he simply telnets to host#1 but not if he uses ssh.  We must use ssh because some people will be connecting though a proxy into our internal LAN.

The error message I get is:
X11 connection rejected because of wrong authentication.

I'm assuming this error comes from the fact that I don't have the authority to use his X11 forwarding that ssh has automatically set up.  Is there any way to get around this?  With his approval of course.

-Mark
0
Comment
Question by:markhorton
  • 2
3 Comments
 
LVL 5

Expert Comment

by:n0thing
Comment Utility
Hi,

   I don't know where the ssh config file is on that system. But it is usually under /etc/sshd_config.
Check for the line :
"X11Forwarding no"
change it to "X11Forwarding yes" and restart the sshd deamon.
You will need root in order to do this.

Regards,
Minh Lai

0
 

Author Comment

by:markhorton
Comment Utility
The problem is that I am not doing X11 forwarding to myself.  The X11 forwarding to myself works correctly.  I am trying to start an X application and forward it to someone else's screen.

-Mark
0
 
LVL 5

Accepted Solution

by:
n0thing earned 500 total points
Comment Utility
Sorry, I misunderstand the question. Try to recompile the deamon, make sure that the program "xauth" is in your path when you compile it. DO a find /usr -name xauth -print to see where it is and add the path to your current path. Reconfigure ssh and rebuild it.

Regards,
Minh Lai
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now