# HELP - trouble mapping X over ssh - SOLVED

## Moriah

I just installed gentoo on a new system, 3.6.11 gentoo-sources, with openssh 5.9_p1-r4, and I edited /etc/ssh/sshd_config as follows:

```

#AllowTcpForwarding yes

#GatewayPorts no

GatewayPorts yes

X11Forwarding yes

#X11DisplayOffset 10

#X11UseLocalhost yes

#PrintMotd yes

```

But I cannot get ssh to map X properly.  The value of $DISPLAY is empty:

```

hophni log # echo $DISPLAY

hophni log # 

```

Likewise, when I try to log in, it lets me login, but with an error message:

```

rj@moses ~ $ ssh -Y root@hophni

Password: 

X11 forwarding request failed on channel 0

Last login: Mon Jan 14 01:00:20 EST 2013 from moses on pts/0

Last login: Mon Jan 14 19:58:35 2013 from moses

hophni ~ # 

```

Why is it not forwarding X?  This same setup (different kernel version) works on another machine, and /etc/ssh/sshd_config is identical there.

Oh yes, there is no firewall on the misbehaving machine, but the misbehaving machine is x86_amd, while the one that works is x86.  That should not make any difference here though.

Anybody have any ideas what the problem could be?

----------

## BillWho

Moriah,

What does grep ForwardX11 /etc/ssh/ssh_config return   :Question: 

----------

## Moriah

```

hophni ~ # grep ForwardX11 /etc/ssh/ssh_config

#   ForwardX11 no

hophni ~ #

```

But that controls the client.  My problem is logging into this machine from another machine, and X11 gets forwarded there fine for other boxes.  The machine in question is the sshd server machine, not the ssh client machine.  Observe:

```

rj@moses ~ $ ssh -Y root@eli

Last login: Tue Jan 15 20:27:46 EST 2013 from 192.168.2.2 on ssh

Last login: Tue Jan 15 20:27:51 2013 from 192.168.2.2

eli ~ # echo $DISPLAY

localhost:11.0

eli ~ # logout

Connection to eli closed.

rj@moses ~ $ ssh -Y root@hophni

Password: 

X11 forwarding request failed on channel 0

Last login: Mon Jan 14 19:58:35 EST 2013 from moses on pts/0

Last login: Mon Jan 14 20:29:39 2013 from moses

hophni ~ # echo $DISPLAY

hophni ~ # logout

Connection to hophni closed.

rj@moses ~ $ 

```

The machine eli has an identical openssh sshd installation with an identical /etc/ssh/sshd_config file, so the problem is somewhere else.

----------

## Hu

Does hophni have xauth in a standard location?  Does its sshd log any useful information?  Is there anything helpful in ssh -vvv -Y root@hophni?

----------

## BillWho

When logged into hophni does xauth info return anything   :Question: 

----------

## Moriah

There was no xauth installed.    :Sad:   :Embarassed:   :Embarassed:   :Embarassed: 

Once it was installed -- problem solved!    :Very Happy: 

----------

