Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-12 Thread Frank Shute
On Tue, Jul 12, 2011 at 03:18:07AM -0700, per...@pluto.rain.com wrote:

 DISPLAY is not getting set in a remote shell started by ssh -X.
 
   $ echo $DISPLAY
   :0.0
   $ ssh -X [server] 'echo DISPLAY=%$DISPLAY%'
   DISPLAY=%%
 
 How would I go about debugging this?
 
 DISPLAY _is_ set correctly on the ssh client -- I am running in
 an xterm there, and can successfully start another (local) one --
 and the word DISPLAY is not present in any of the shell startup
 files (.bash*, .cshrc, .login, .profile, .shrc) on either the
 ssh client or the ssh server.
 
 The ssh client is FreeBSD 6.1 and the ssh server is FreeBSD 8.1.
 
 It does work correctly in the other direction (using the 8.1 system
 as the ssh client and the 6.1 system as the ssh server), and I can
 run X11 programs on the 8.1 system, displaying on the 6.1 system,
 provided I set DISPLAY appropriately on the 8.1 system.  It's only
 the ssh X11 forwarding that's broken, and only in one direction.

Have you tried putting:

DISPLAY=:0.0

in ~/.ssh/environment on the machine that's not setting DISPLAY
properly?

Regards,

-- 

 Frank

 Contact info: http://www.shute.org.uk/misc/contact.html




pgpL3UspxCyWi.pgp
Description: PGP signature


Solved: Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-12 Thread perryh
Mark Felder f...@feld.me wrote:

 On Tue, 12 Jul 2011 00:06:33 -0500, Michael Sierchio ku...@tenebras.com
 wrote:

  xauth not in your path?

 ssh -Y skips all auth stuff so you don't need xauth; he said that
 didn't work either :-(

Well, apparently, even -Y needs xauth (which was not installed on
the 8.1 system) on the ssh server -- although not on the ssh client.
After installing it:

  $ ssh -Y fbsd81 'echo DISPLAY=%$DISPLAY%'
  /usr/local/bin/xauth:  creating new authority file /home/perryh/.Xauthority
  DISPLAY=%localhost:10.0%

and -X also works :) so this turns out to have been the solution.

Next question:  shouldn't I have gotten some kind of error message
when attempting ssh -X or ssh -Y when xauth wasn't available?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-12 Thread perryh
Frank Shute fr...@shute.org.uk wrote:

 On Tue, Jul 12, 2011 at 03:18:07AM -0700, per...@pluto.rain.com wrote:
 
  DISPLAY is not getting set in a remote shell started by ssh -X.
...
 Have you tried putting:

 DISPLAY=:0.0

 in ~/.ssh/environment on the machine that's not setting DISPLAY
 properly?

Wouldn't that cause the remote app -- which is running on the
ssh server -- to (try to) use that machine's own local display?
A port-forwarded connection normally has something along the
lines of

  DISPLAY=localhost:10.0

(but it can't be hard-coded, because the 10 part will vary
depending on what-all port-forwarded connections exist).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-11 Thread perryh
DISPLAY is not getting set in a remote shell started by ssh -X.

  $ echo $DISPLAY
  :0.0
  $ ssh -X [server] 'echo DISPLAY=%$DISPLAY%'
  DISPLAY=%%

How would I go about debugging this?

DISPLAY _is_ set correctly on the ssh client -- I am running in
an xterm there, and can successfully start another (local) one --
and the word DISPLAY is not present in any of the shell startup
files (.bash*, .cshrc, .login, .profile, .shrc) on either the
ssh client or the ssh server.

The ssh client is FreeBSD 6.1 and the ssh server is FreeBSD 8.1.

It does work correctly in the other direction (using the 8.1 system
as the ssh client and the 6.1 system as the ssh server), and I can
run X11 programs on the 8.1 system, displaying on the 6.1 system,
provided I set DISPLAY appropriately on the 8.1 system.  It's only
the ssh X11 forwarding that's broken, and only in one direction.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-11 Thread Mark Felder

This sounds silly, but what happens if you try ssh -Y



Regards,


Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-11 Thread perryh
Mark Felder f...@feld.me wrote:

 This sounds silly, but what happens if you try ssh -Y

Exactly the same thing as with -X, in either direction.

It still fails with the 6.1 system as the ssh client,
and works with the 6.1 system as the ssh server
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-11 Thread Michael Sierchio
xauth not in your path?

On Tue, Jul 12, 2011 at 4:46 AM,  per...@pluto.rain.com wrote:
 Mark Felder f...@feld.me wrote:

 This sounds silly, but what happens if you try ssh -Y

 Exactly the same thing as with -X, in either direction.

 It still fails with the 6.1 system as the ssh client,
 and works with the 6.1 system as the ssh server
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-11 Thread Mark Felder
On Tue, 12 Jul 2011 00:06:33 -0500, Michael Sierchio ku...@tenebras.com  
wrote:



xauth not in your path?


ssh -Y skips all auth stuff so you don't need xauth; he said that didn't  
work either :-(

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-11 Thread Eitan Adler

 It still fails with the 6.1 system as the ssh client,
 and works with the 6.1 system as the ssh server

Is X11Forwarding yes set in the server config of the failing direction?

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org




-- 
Eitan Adler
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ssh -X (X11 forwarding) not working from 6.1 to 8.1

2011-07-11 Thread perryh
Eitan Adler li...@eitanadler.com wrote:

  It still fails with the 6.1 system as the ssh client,
  and works with the 6.1 system as the ssh server

 Is X11Forwarding yes set in the server config of the failing
 direction?

Both seem to be defaulted.

On 6.1:

  $ egrep -C 2 X11Forwarding /etc/ssh/sshd_config
  #AllowTcpForwarding yes
  #GatewayPorts no
  #X11Forwarding yes
  #X11DisplayOffset 10
  #X11UseLocalhost yes

On 8.1:

  $ egrep -C 2 X11Forwarding /etc/ssh/sshd_config
  #AllowTcpForwarding yes
  #GatewayPorts no
  #X11Forwarding yes
  #X11DisplayOffset 10
  #X11UseLocalhost yes
  --
  # Example of overriding settings on a per-user basis
  #Match User anoncvs
  #   X11Forwarding no
  #   AllowTcpForwarding no
  #   ForceCommand cvs server
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org