Discussion:
[Grml] X11 forwarding
Maurice McCarthy
2009-01-27 16:37:10 UTC
Permalink
Right so Mika sorted my wlan and I've cured a sound defect myself.
There is no urgency whatsoever in this, but I'll ask out of curiosity.

The last nuisance puzzling me is X11 forwarding inside my simple home
lan. Sounds silly perhaps but I'm just learning how to network for
myself. I can X11 forward from my secure shell account based in
London: Thus

user at laptop$ ssh -fX moss at mythic-beasts.com xclock

gives me an xclock. This tells me that at least my Xserver and ssh on
the laptop must be configured right for X11 forwarding. The home lan
is simply the laptop a wireless router BTVOYAGER2110 and my trusty old
Pentium II PC. The PII is wired into the router so communication
between the laptop and the PII is through the router. There is no
longer a monitor connected to the PII.

user at laptop$ ssh -fX user at PII xclock

gives "Error: Can't open display:" followed by a blank line. ssh has
failed to set the environmental variable $DISPLAY. It is exactly the
same if I put a wire directly between PII and the laptop and configure
a static network. The laptop is running grml-2008.11 with apt pointed
at Lenny but the PII run grml-1.0 pointed at Etch.

user at laptop$ ssh -Xvvv user at PII

gives this output after accepting the password

debug2: x11_get_proto: /usr/bin/X11/xauth list :0.0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: tty_make_modes: ospeed 38400
debug3: tty_make_modes: ispeed 38400
debug1: Sending environment.

There is then a long list of env ignored including the display

user at PII$ echo $DISPLAY Gives a blank output.

user at PII$ export DISPLAY=:10 # This is poor practice as it can obviate
# encryption but I
tried it anyhow as
# I'm only at home.
user at PII$ xclock &

and the xclock shows up in htop but it does not display on the laptop.
So the basic problem is that ssh is not setting the display though it
ought to. I must have a misconfiguration somewhere on the PII.
.ssh/config reads thus

Host * # I know this in not secure.
ForwardAgent yes
ForwardX11 yes
AllowTcpForwarding yes
--
Once again, thanks for any help
Moss
Ulrich Dangel
2009-01-27 16:53:00 UTC
Permalink
On Tuesday 27 January 2009 17:37:10 Maurice McCarthy wrote:
Hi,
Post by Maurice McCarthy
I must have a misconfiguration somewhere on the PII.
You just have to enable X11Forwarding in your sshd_config.
Just put
,----
| X11Forwarding yes
`----
in your /etc/ssh/sshd_config and reload the ssh daemon.

Uli
moss
2009-01-27 19:10:00 UTC
Permalink
Post by Ulrich Dangel
Just put
,----
| X11Forwarding yes
`----
in your /etc/ssh/sshd_config and reload the ssh daemon.
Uli
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.

Moss
Ulrich Dangel
2009-01-27 22:10:56 UTC
Permalink
Post by moss
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.
Do you have xauth installed on the server? Its needed for correct
X11Forwarding.
Can you please connect via ssh -vX and provide the output?

Uli
moss
2009-01-28 12:02:15 UTC
Permalink
Uli

I found the following command to merge the ~/.Xauthority files at
http://www.math.uwaterloo.ca/%7Econsulta/greatest-hits/xterm.html but
it has not cured the problem

moss at laptop$ xauth extract - $DISPLAY | ssh moss at 192.168.1.4 xauth merge -

It executed OK. Maybe I'll reinstall ssh on the PII

Regards
Moss
Post by Ulrich Dangel
Post by moss
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.
Do you have xauth installed on the server? Its needed for correct
X11Forwarding.
Can you please connect via ssh -vX and provide the output?
Uli
_______________________________________________
Grml mailing list - Grml at mur.at
http://lists.mur.at/mailman/listinfo/grml
join #grml on irc.freenode.org
grml-devel-blog: http://grml.supersized.org/
--
Best Wishes
moss
2009-01-28 13:51:41 UTC
Permalink
Uli

I pointed apt on th PII to Lenny instead of Etch and did

# aptitude update && aptitude intall openssh-client openssh-server

To which this bug came up

serious bugs of openssh-client (1:4.3p2-9etch3 -> 1:5.1p1-5) <pending>
#513071 - Regression: for some hosts etch can connect but lenny can't

Tried upgrading openssh but something has become broken and dpkg is
failing and giving me core dumps. So I think I'll do a minimal Lenny
install on the PII. This should do me as I am effectively using the
PII as a network hard drive plus a little playing. Thanks for your
help.
--
Best Wishes
Moss
moss
2009-01-29 14:16:56 UTC
Permalink
Fixed.

Don't understand why X11 forwarding did not work before but I
re-installed grml-1.0 on the PII and everything worked immediately. I
can only think that ssh on the PII had been corrupted somehow.

Thanks Uli
Moss
moss
2009-01-29 14:16:56 UTC
Permalink
Fixed.

Don't understand why X11 forwarding did not work before but I
re-installed grml-1.0 on the PII and everything worked immediately. I
can only think that ssh on the PII had been corrupted somehow.

Thanks Uli
Moss
moss
2009-01-29 14:16:56 UTC
Permalink
Fixed.

Don't understand why X11 forwarding did not work before but I
re-installed grml-1.0 on the PII and everything worked immediately. I
can only think that ssh on the PII had been corrupted somehow.

Thanks Uli
Moss

moss
2009-01-28 13:51:41 UTC
Permalink
Uli

I pointed apt on th PII to Lenny instead of Etch and did

# aptitude update && aptitude intall openssh-client openssh-server

To which this bug came up

serious bugs of openssh-client (1:4.3p2-9etch3 -> 1:5.1p1-5) <pending>
#513071 - Regression: for some hosts etch can connect but lenny can't

Tried upgrading openssh but something has become broken and dpkg is
failing and giving me core dumps. So I think I'll do a minimal Lenny
install on the PII. This should do me as I am effectively using the
PII as a network hard drive plus a little playing. Thanks for your
help.
--
Best Wishes
Moss
moss
2009-01-28 13:51:41 UTC
Permalink
Uli

I pointed apt on th PII to Lenny instead of Etch and did

# aptitude update && aptitude intall openssh-client openssh-server

To which this bug came up

serious bugs of openssh-client (1:4.3p2-9etch3 -> 1:5.1p1-5) <pending>
#513071 - Regression: for some hosts etch can connect but lenny can't

Tried upgrading openssh but something has become broken and dpkg is
failing and giving me core dumps. So I think I'll do a minimal Lenny
install on the PII. This should do me as I am effectively using the
PII as a network hard drive plus a little playing. Thanks for your
help.
--
Best Wishes
Moss
moss
2009-01-28 12:02:15 UTC
Permalink
Uli

I found the following command to merge the ~/.Xauthority files at
http://www.math.uwaterloo.ca/%7Econsulta/greatest-hits/xterm.html but
it has not cured the problem

moss at laptop$ xauth extract - $DISPLAY | ssh moss at 192.168.1.4 xauth merge -

It executed OK. Maybe I'll reinstall ssh on the PII

Regards
Moss
Post by Ulrich Dangel
Post by moss
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.
Do you have xauth installed on the server? Its needed for correct
X11Forwarding.
Can you please connect via ssh -vX and provide the output?
Uli
_______________________________________________
Grml mailing list - Grml at mur.at
http://lists.mur.at/mailman/listinfo/grml
join #grml on irc.freenode.org
grml-devel-blog: http://grml.supersized.org/
--
Best Wishes
moss
2009-01-28 12:02:15 UTC
Permalink
Uli

I found the following command to merge the ~/.Xauthority files at
http://www.math.uwaterloo.ca/%7Econsulta/greatest-hits/xterm.html but
it has not cured the problem

moss at laptop$ xauth extract - $DISPLAY | ssh moss at 192.168.1.4 xauth merge -

It executed OK. Maybe I'll reinstall ssh on the PII

Regards
Moss
Post by Ulrich Dangel
Post by moss
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.
Do you have xauth installed on the server? Its needed for correct
X11Forwarding.
Can you please connect via ssh -vX and provide the output?
Uli
_______________________________________________
Grml mailing list - Grml at mur.at
http://lists.mur.at/mailman/listinfo/grml
join #grml on irc.freenode.org
grml-devel-blog: http://grml.supersized.org/
--
Best Wishes
Ulrich Dangel
2009-01-27 22:10:56 UTC
Permalink
Post by moss
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.
Do you have xauth installed on the server? Its needed for correct
X11Forwarding.
Can you please connect via ssh -vX and provide the output?

Uli
Ulrich Dangel
2009-01-27 22:10:56 UTC
Permalink
Post by moss
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.
Do you have xauth installed on the server? Its needed for correct
X11Forwarding.
Can you please connect via ssh -vX and provide the output?

Uli
moss
2009-01-27 19:10:00 UTC
Permalink
Post by Ulrich Dangel
Just put
,----
| X11Forwarding yes
`----
in your /etc/ssh/sshd_config and reload the ssh daemon.
Uli
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.

Moss
moss
2009-01-27 19:10:00 UTC
Permalink
Post by Ulrich Dangel
Just put
,----
| X11Forwarding yes
`----
in your /etc/ssh/sshd_config and reload the ssh daemon.
Uli
Thank you. I tried this just now but stil the $DISPLAY is not set on PII.

Moss
Maurice McCarthy
2009-01-27 16:37:10 UTC
Permalink
Right so Mika sorted my wlan and I've cured a sound defect myself.
There is no urgency whatsoever in this, but I'll ask out of curiosity.

The last nuisance puzzling me is X11 forwarding inside my simple home
lan. Sounds silly perhaps but I'm just learning how to network for
myself. I can X11 forward from my secure shell account based in
London: Thus

user at laptop$ ssh -fX moss at mythic-beasts.com xclock

gives me an xclock. This tells me that at least my Xserver and ssh on
the laptop must be configured right for X11 forwarding. The home lan
is simply the laptop a wireless router BTVOYAGER2110 and my trusty old
Pentium II PC. The PII is wired into the router so communication
between the laptop and the PII is through the router. There is no
longer a monitor connected to the PII.

user at laptop$ ssh -fX user at PII xclock

gives "Error: Can't open display:" followed by a blank line. ssh has
failed to set the environmental variable $DISPLAY. It is exactly the
same if I put a wire directly between PII and the laptop and configure
a static network. The laptop is running grml-2008.11 with apt pointed
at Lenny but the PII run grml-1.0 pointed at Etch.

user at laptop$ ssh -Xvvv user at PII

gives this output after accepting the password

debug2: x11_get_proto: /usr/bin/X11/xauth list :0.0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: tty_make_modes: ospeed 38400
debug3: tty_make_modes: ispeed 38400
debug1: Sending environment.

There is then a long list of env ignored including the display

user at PII$ echo $DISPLAY Gives a blank output.

user at PII$ export DISPLAY=:10 # This is poor practice as it can obviate
# encryption but I
tried it anyhow as
# I'm only at home.
user at PII$ xclock &

and the xclock shows up in htop but it does not display on the laptop.
So the basic problem is that ssh is not setting the display though it
ought to. I must have a misconfiguration somewhere on the PII.
.ssh/config reads thus

Host * # I know this in not secure.
ForwardAgent yes
ForwardX11 yes
AllowTcpForwarding yes
--
Once again, thanks for any help
Moss
Ulrich Dangel
2009-01-27 16:53:00 UTC
Permalink
On Tuesday 27 January 2009 17:37:10 Maurice McCarthy wrote:
Hi,
Post by Maurice McCarthy
I must have a misconfiguration somewhere on the PII.
You just have to enable X11Forwarding in your sshd_config.
Just put
,----
| X11Forwarding yes
`----
in your /etc/ssh/sshd_config and reload the ssh daemon.

Uli
Maurice McCarthy
2009-01-27 16:37:10 UTC
Permalink
Right so Mika sorted my wlan and I've cured a sound defect myself.
There is no urgency whatsoever in this, but I'll ask out of curiosity.

The last nuisance puzzling me is X11 forwarding inside my simple home
lan. Sounds silly perhaps but I'm just learning how to network for
myself. I can X11 forward from my secure shell account based in
London: Thus

user at laptop$ ssh -fX moss at mythic-beasts.com xclock

gives me an xclock. This tells me that at least my Xserver and ssh on
the laptop must be configured right for X11 forwarding. The home lan
is simply the laptop a wireless router BTVOYAGER2110 and my trusty old
Pentium II PC. The PII is wired into the router so communication
between the laptop and the PII is through the router. There is no
longer a monitor connected to the PII.

user at laptop$ ssh -fX user at PII xclock

gives "Error: Can't open display:" followed by a blank line. ssh has
failed to set the environmental variable $DISPLAY. It is exactly the
same if I put a wire directly between PII and the laptop and configure
a static network. The laptop is running grml-2008.11 with apt pointed
at Lenny but the PII run grml-1.0 pointed at Etch.

user at laptop$ ssh -Xvvv user at PII

gives this output after accepting the password

debug2: x11_get_proto: /usr/bin/X11/xauth list :0.0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: tty_make_modes: ospeed 38400
debug3: tty_make_modes: ispeed 38400
debug1: Sending environment.

There is then a long list of env ignored including the display

user at PII$ echo $DISPLAY Gives a blank output.

user at PII$ export DISPLAY=:10 # This is poor practice as it can obviate
# encryption but I
tried it anyhow as
# I'm only at home.
user at PII$ xclock &

and the xclock shows up in htop but it does not display on the laptop.
So the basic problem is that ssh is not setting the display though it
ought to. I must have a misconfiguration somewhere on the PII.
.ssh/config reads thus

Host * # I know this in not secure.
ForwardAgent yes
ForwardX11 yes
AllowTcpForwarding yes
--
Once again, thanks for any help
Moss
Ulrich Dangel
2009-01-27 16:53:00 UTC
Permalink
On Tuesday 27 January 2009 17:37:10 Maurice McCarthy wrote:
Hi,
Post by Maurice McCarthy
I must have a misconfiguration somewhere on the PII.
You just have to enable X11Forwarding in your sshd_config.
Just put
,----
| X11Forwarding yes
`----
in your /etc/ssh/sshd_config and reload the ssh daemon.

Uli
Loading...