X11 Forwarding solution

2003-03-07 Thread Chris Horn
I think I've figured it out.  The critical missing factor was xauth on the 
remote machine.   I've summarized how I managed to get things to work below.

-

I have a machine that I am sitting at, we shall call it local.  It is from 
here that I am running the ssh client to log into the remote machine and 
run my X11 app across the network.

The remote machine can also be called the server, and is running 
sshd.  This server machine has the X application that I wish to run.

The remote box does NOT have to have an X server installed.  It is a 
server, it doesn't need X; as long as the X applications have their 
libraries on the server, everything will be fine.  The server must, 
however, have some X applications installed on it (e.g. ethereal).  Without 
them, what would be the point of X11 forwarding!?!

The server also MUST have a local copy of xauth for the ssh X11 forwarding 
to work.  SSH uses the xauth on the local machine to set up an xauth entry 
for the dummy X server that it sets up.  For Debian, this can be 
accomplished by installing the xbase-clients package.

On the remote box, I also had to set the X11Forwarding variable to 'yes' in 
sshd_config.  After telling sshd to reload its configuration files (or 
restarting it), I was able to do the normal steps to forward X11.

ssh -l username -XC remote_machine

You may also need to use the -A option to enable forwarding of the 
authentication agent connection.  I'm not really sure of what this means, 
however.

Be sure to check the command line parameters for your copy of ssh.  I know 
that on a SunOS maachine, I use a command-line that looks like this:

ssh -l username +X +C +a remote_machine

Where the +a is that optional forwarding of the auth agent connection...

I hope this clears it up for everyone.
Thanks for your help!
-
[EMAIL PROTECTED]
703.413.1100 x5100


SSH X forwarding not working

2003-03-06 Thread Chris Horn
Greetings.  I've looked over the mailing list, but haven't been able to 
find out why using

ssh -X remote-host

wouldn't actually let you run X apps on the distant machine (to display 
locally).  I'm using the absolute latest and greatest Cygwin XFree86 
(fetched yesterday).

Any help would be much appreciated.

NOTE: I use startx (I have also tried using xinit) and have added 'export 
DISPLAY=localhost:0.0' to my .xinitrc.

Thanks in advance.
chris.
-
[EMAIL PROTECTED]
703.413.1100 x5100


Re: SSH X forwarding not working

2003-03-06 Thread Chris Horn
At the other end, /etc/ssh/sshd_config now has the line X11Forwarding yes

Still no go.

When I connect, the DISPLAY value on the remote box appears null.
When I'm local, it's localhost:0.0
The error I receive when trying to run apps is Gtk-WARNING **: cannot open 
display:

When I used xhost and set DISPLAY manually, things work:

1. xhost +remote_host
2. on remote box set DISPLAY to local_host:0.0
3. run app, and it appears like it should!
Also, does anyone know how to cut and paste:
1. Within X (do I have to run XWin with -emulate3buttons?), and
2. between X and Windows?
Merci beaucoup.
chris.
At 04:02 PM Thursday 3/6/2003, you wrote:
viestissä torstai 6. maaliskuuta 2003 23:04, chris horn kirjoitti:

 greetings.  i've looked over the mailing list, but haven't been able to
 find out why using
 ssh -x remote-host

have you configured the remote end to accept x forwarding in
/etc/ssh/sshd_config?
--
/(anton)


-
[EMAIL PROTECTED]
703.413.1100 x5100


Re: SSH X forwarding not working

2003-03-06 Thread Chris Horn
I had restarted sshd.

At 04:45 PM Thursday 3/6/2003, you wrote:
Chris,

Okay, so you had X11Forwarding disabled before.  What have you done to 
make sshd re-read its configuration file?  Specifically restarted 
sshd?  Restarted the entire machine?  What?  I suspect that sshd happily 
thinks that X11Forwarding is still disabled.

Harold

Chris Horn wrote:
At the other end, /etc/ssh/sshd_config now has the line X11Forwarding yes
Still no go.
When I connect, the DISPLAY value on the remote box appears null.
When I'm local, it's localhost:0.0
The error I receive when trying to run apps is Gtk-WARNING **: cannot 
open display:
When I used xhost and set DISPLAY manually, things work:
1. xhost +remote_host
2. on remote box set DISPLAY to local_host:0.0
3. run app, and it appears like it should!
Also, does anyone know how to cut and paste:
1. Within X (do I have to run XWin with -emulate3buttons?), and
2. between X and Windows?

Merci beaucoup.
chris.
At 04:02 PM Thursday 3/6/2003, you wrote:
viestissä torstai 6. maaliskuuta 2003 23:04, chris horn kirjoitti:

 greetings.  i've looked over the mailing list, but haven't been able to
 find out why using
 ssh -x remote-host

have you configured the remote end to accept x forwarding in
/etc/ssh/sshd_config?
--
/(anton)
-
[EMAIL PROTECTED]
703.413.1100 x5100


-
[EMAIL PROTECTED]
703.413.1100 x5100


Re: SSH X forwarding not working

2003-03-06 Thread Chris Horn
At 04:50 PM Thursday 3/6/2003, you wrote:
Hmm looked through the mail again and saw:

|  ssh -x remote-host

Have you tried ssh -X, capital X, using small x disables ssh
forwarding.
Sorry, sloppy typing.  I've been using -X, the text in this email was a typo.


Meanwhile:

/ Chris Horn [EMAIL PROTECTED] wrote:
| At the other end, /etc/ssh/sshd_config now has the line X11Forwarding yes
|
| Still no go.
|
| When I connect, the DISPLAY value on the remote box appears null.
| When I'm local, it's localhost:0.0
And this local, it is from the prompt you do ssh from?
Yeah.  When I'm in Cygwin XFree86 on my local machine in an xterm, I've 
been typing 'echo $DISPLAY' to see what it's set to.


| When I used xhost and set DISPLAY manually, things work:

just a note, you are aware that the X traffic goes unencrypted when
doing it this way (setting DISPLAY to host_done_ssh_from)?
Yes.  Which is why I want to get SSH's X forwarding working already!


| 2. on remote box set DISPLAY to local_host:0.0

Assuming local_host here is host_done_ssh_from?
Yeah.  I was on the remote machine (through a SSH session) and set DISPLAY 
to be the display of the machine I'm sitting at - which I've been calling 
local (because it's right in front of me).

Sorry, I guess I could've been clearer.


| Also, does anyone know how to cut and paste:
|  1. Within X (do I have to run XWin with -emulate3buttons?), and
If you have a threebutton mouse like microsoft with scrollball, you
probably can use the third button.. (like me)
Huh.  I think the problem is that I have the middle mouse button (the 
scrollwheel) set to double-click in Windows and that behavior is overriding 
what it would normally do in X - namely paste!

I exclusively run Linux on my personal machine at home, so not having paste 
is *really* frustrating!


|  2. between X and Windows?

There are work being done on this, check the mailinglist. xwinclip is
the keyword I think.
I'll check it out; thanks.

-
[EMAIL PROTECTED]
703.413.1100 x5100


another thing

2003-03-06 Thread Chris Horn
Seeing as I don't have that clip thing, here's some paraphrased debug messages:

Warning: No xauth data; using fake auth data for X11 forwarding
debug1: Requesting X11 fwd w/ auth spoofing
debug1: channel request 0: x11-req
debug1: Remote: No xauth program; cannot forward with spoofing.
Does that mean that I need to install X (or at least xauth) on the remote 
machine?

Thanks for all the help so far.
chris.
-
[EMAIL PROTECTED]
703.413.1100 x5100