To Whom It May Concern:

We are trying to get x2go to work with a Vserver instance but cannot connect.  We've done some looking at x2go posts into the error, but we're not sure the responses apply to using Vserver and are still looking for some help (apologies if we should have been able to find this on our own).

The error is first:

"X2go-51 The remote proxy closed the connection while negotiating the session.  This may be due to the wrong authentication credentials passed to the server."  The window includes an "OK" button.

If we press the OK button, we get to the x2go login screen where you can enter a password...if we enter the password, we get:

"Error  Connection failed channel_open_session failed - Writing packet:  error on socket (or connection closed):  Broken pipe."

On the client, in the "sessions" file we see:

Loop:  PANIC!  The remote NX Proxy closed the connection.
Loop:  PANIC!  Failure negotiating the session in stage '7'.
Loop:  PANIC! Wrong version or invalid session authentication cookie.

In both the client "options" file, the cookie looks to be the same as the cookie in the server

FYI - we can ping the Vserver instance, and we can ssh into the Vserver successfully, ping 8.8.8.8 from there etc.  Also, initially when this wouldn't work, we though maybe we had issues with how we had set up desktops in the Vserver (which is still possible:  we're using gnome, gdm) but when we spun up another Vserver and set up VNC, it serves the desktop correctly so at first blush this seems to be a networking/ports/firewall/sshd/routing type of issue.

However, we're still having trouble getting a regular X session to run over SSH.....but are assuming at the moment (possibly incorrectly) that the X2go errors we're getting are an issue on their own, possibly in addition to running an X session on a Vserver.

...And...at various points (though not on the current server instances), we set up x2go on the host and could connect to that over our LAN.  Again, the current instances only have x2go running on the Vserver guest.

SETUP

1)  OpenSsh-Server

We have openssh-server running only on the Vserver guest (we tried having it on the host too, but that didn't seem to matter).   We are using port 22.  We've tried using a
ListenAddress xxx.xxx.xxx.xxx which is the IP of the host, but this doesn't seem to matter.

2) X2go

Likewise X2go server is only installed on the Vserver instance (though again we tried it on both the host and guest with no differences we could see).

We set up x2go on Ubuntu 10.4 server (both host and guest)using:
apt-get install python-software-properties
add-apt-repository ppa:x2go/stable
apt-get update
apt-get install -y x2goserver
apt-get install -y x2goserver-extensions

2) We made sure from a client that we can successfully ssh.  Again, this may not mean anything, but we can VNC to the guest desktop successfully.

3)  We try x2go from a linux client (Ubuntu 10.10, x2go version 3.99.1.1) and get the errors described above.

Q:  are we using too old a client version?
Q:  is this a firewall issue - we don't have iptables or ufw set up
Q:  is this a matter of changing entries in hosts, hostname, network/interfaces, etc on the Vserver and/or host?

FYI some time back Mike Garbriel responded to one of our inquires (thanks Mike) on using chroot (http://comments.gmane.org/gmane.linux.terminal-server.x2go.devel/3720) that mentions (we're assuming for the sake of our example that using port 22 in sshd_config meet this suggestion):

If you work with pure chroots then install x2goserver into each  
chroot. Configure the chroot's SSH daemon to listen on a specific SSH  
port.

So at the end you have

   chroot-1 - <port-1>
   chroot-2 - <port-2>

Setup up X2Go client to connect to your host, for chroot-1 choose  
<port-1> in your X2Go client configuration, <port-2> for chroot-2, etc.

Help appreciated! Thanks,

Ted