# X11 connection rejected because of wrong authent[SOLVED]

## madchaz

I'm trying to use mobaxterm to launch X applications from windows. The idea is that I have a few things I would like people on my network to launch from a linux box. (running gentoo, of course). 

Unfortunatly, I keep getting the following message when trying to launch. 

```
madchaz@sonofboo ~ $ xterm

X11 connection rejected because of wrong authentication.

X11 connection rejected because of wrong authentication.

xterm Xt error: Can't open display: sonofboo:10.0

```

I turned on verbose mode. I get a bit more info. When I connect, I get this 

```

OpenSSH_5.5p1, OpenSSL 0.9.8o 01 Jun 2010

debug1: Reading configuration data /etc/ssh_config

debug1: Connecting to sonofboo [xxx.xxx.xxx.xxx] port 22.

debug1: Connection established.

debug1: identity file /home/username/.ssh/id_rsa type -1

debug1: identity file /home/username/.ssh/id_rsa-cert type -1

debug1: Remote protocol version 2.0, remote software version OpenSSH_5.6

debug1: match: OpenSSH_5.6 pat OpenSSH*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_5.5

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: server->client aes128-ctr hmac-md5 zlib@openssh.com

debug1: kex: client->server aes128-ctr hmac-md5 zlib@openssh.com

debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

debug1: SSH2_MSG_KEX_DH_GEX_INIT sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

debug1: Host 'sonofboo' is known and matches the RSA host key.

debug1: Found key in /home/username/.ssh/known_hosts:1

debug1: ssh_rsa_verify: signature correct

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: SSH2_MSG_NEWKEYS received

debug1: Roaming not allowed by server

debug1: SSH2_MSG_SERVICE_REQUEST sent

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug1: Authentications that can continue: publickey,keyboard-interactive

debug1: Next authentication method: publickey

debug1: Trying private key: /home/user/.ssh/id_rsa

debug1: Next authentication method: keyboard-interactive

Password:

debug1: Enabling compression at level 6.

debug1: Authentication succeeded (keyboard-interactive).

debug1: channel 0: new [client-session]

debug1: Requesting no-more-sessions@openssh.com

debug1: Entering interactive session.

debug1: No xauth program.

Warning: No xauth data; using fake authentication data for X11 forwarding.

debug1: Requesting X11 forwarding with authentication spoofing.

```

And I get this when I try to launch xterm

```
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384

debug1: client_request_x11: request from 127.0.0.1 36142

debug1: channel 1: new [x11]

debug1: confirm x11

X11 connection rejected because of wrong authentication.

debug1: channel 1: free: x11, nchannels 2

debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384

debug1: client_request_x11: request from 127.0.0.1 36143

debug1: channel 1: new [x11]

debug1: confirm x11

X11 connection rejected because of wrong authentication.

debug1: channel 1: free: x11, nchannels 2

xterm Xt error: Can't open display: sonofboo:10.0

```

xauth 1.0.4 is installed. I'm rather confused. Anyone can point me in the right direction?

----------

## Hu

You say xauth 1.0.4 is installed.  Is it installed on both machines?  You mentioned launching applications "from windows."  Do you mean that the users will be displaying the content on a Microsoft Windows machine using some special X server?  Your debug output appears to be Linux to Linux, so I am unclear whether Microsoft Windows fits here, and if so, where.

----------

## madchaz

I'm connecting from windows. I use mobaxterm to connect from windows. It's an SSH client that includes extra goodies, like an X server. That's why I want to try to use it to launch graphical applications from the gentoo box. 

xaunt is only installed on the gentoo box.

----------

## madchaz

I tried using xming with putty. I'm getting the same error. 

```
madchaz@sonofboo ~ $ xterm

PuTTY X11 proxy: wrong authentication protocol attemptedPuTTY X11 proxy: wrong authentication protocol attemptedxterm Xt error: Can't open display: sonofboo:11.0

```

----------

## madchaz

Tried connecting with a linux client (ubuntu on my netbook)

Same problem. 

Rebooted the server, same deal. This is getting annoying ....

error when trying on ubuntu. 

 *Quote:*   

> debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384
> 
> debug1: client_request_x11: request from 127.0.0.1 56423
> 
> debug1: channel 1: new [x11]
> ...

 

----------

## madchaz

SOLVED!!!!!!!!!!!!

Added X11UseLocalhost yes in /etc/ssh/sshd_config

that fixed the xaunt issue!

----------

## Hu

 *madchaz wrote:*   

> Added X11UseLocalhost yes in /etc/ssh/sshd_config

 This should have been the default.  Are there any other uncommented lines in /etc/ssh/sshd_config that may have changed it?  What version of net-misc/openssh are you using?

----------

## madchaz

 *Hu wrote:*   

>  *madchaz wrote:*   Added X11UseLocalhost yes in /etc/ssh/sshd_config This should have been the default.  Are there any other uncommented lines in /etc/ssh/sshd_config that may have changed it?  What version of net-misc/penssh are you using?

 

The latest stable version. It is possible I had changed it before at some point, while trying to get it to work.

----------

