Failing to connect to container using x2go

Greetings

Running lxd 3.0 on snapd on debian stretch (stable).
Setup a container to try debian-sid.
Trying to implement a document from mr. simos :
https://blog.simos.info/how-to-use-the-x2go-remote-desktop-with-lxd-containers/

I have been able to make it happen in the past but this time I’m stumped.
I have added x2go-server (+ all its needed goodies), added ssh and ufw, opened the firewall for port 22.
I’m still not able to log into the container as a user (not as root).

Further information is likely needed but I’m not sure what else to write or where to look.
Please - - - and TIA!

Two more things to check

You did also install x2go-xsession

And you checked that your container UserID was a member of the x2gousers “group”

Lastly you can successfully login to the container using ssh as that userID right ? x2go uses ssh to connect…

I thought maybe your first point might be my issue but I had installed x2goserver-xsession.
I can log into container using ssh.

Not sure how to 'check container UserID is a member of the x2gousers “group” '.
Please advise. (Thank you for the ideas to point!!)

Hi!

Show us that you cannot log into the container. If you do this (copy and paste the full messages), it will probably show some information about the error message. Without such a hint, there is not much we can do to help you.

For example, here I made a mistake with the IP address:

$ ssh -v ubuntu@10.50.250.50
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /home/myusername/.ssh/config
debug1: /home/myusername/.ssh/config line 17: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 10.50.250.50 [10.50.250.50] port 22.
debug1: connect to address 10.50.250.50 port 22: No route to host
ssh: connect to host 10.50.250.50 port 22: No route to host

Sorry - - -I’m working on a debian variant (see initial message) so this doesn’t really help (sorry).
I have been working from the wiki from the x2go group for debian installation (it is a little different).

Thank you very much for trying!!

(If only copy and paste worked so easily!!)

root@debianserver:/# ssh memyself@192.168.1.76
memyself@192.168.1.76's passwrd:
Linux debian-sid-gui 4.9.0-6*amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 

The programs included with the Debian GNU/Linux system are free software:
the exact distribution terms for each program are described in the 
individual files in /use/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 
permitted by applicable law.
Last login: Monday May28 15:57:23 2018 from 192.168.1.131
$

so I can log into the container.
I can ssh into the container.
What I can’t do is connect to the x2go server in the container by a client outside the container. (I have tried both from the server the container is on and also from a second machine.)

I was hoping that you, Mr. Simos, might be able to help me decipher what is causing my lack of connectivity with x2go.

TIA

Thank you very much for trying to help!!

I had missed 2 steps:
– added the x2go key per x2go website https://wiki.x2go.orNew sessiong/doku.php/wiki:repositories:debian …

and part of this one (hadn’t installed a desktop)

– install minimal mate desktop & x2go "server components –

I’m now waiting for the install to finish (lxde - - - my desktop environment of choice (I seem to be in rarefied air with this one too! - - - grin!!)).

OK - - - got all the bits installed (I think) but I still can’t connect.

The error message is on the screen for maybe 3 seconds so its hard to read AND understand all of it in that time. Something about a screen 0:0 (IIRC) and then it cam back with that glorious 'mismatched . . . ’ which just means that I’m not connected.

Sorry - - - is there some setting in x2go that I may have not gotten correct?

I do have a container set up with x2go server and its working fine but its on debian stable and there definitely are differences between stable and sid. Its also been a couple months since I set that one up so I’m not remembering all the steps that I did - - - wish there were an easier way of recording process implementations but there isn’t (yet I think).

Thanking you for your assistance.

Looking in log files I am finding some information in /var/log/lightdm.

Not sure how to interpret what I’m seeing though!

OK - - - so I thought that perhaps my not doing things in a particular order was possibly causing the problem - - - so I created a new container and tried to follow the script proffered by bmullan .

I am still unable to log into this new container using x2goclient.
I understand that your container session worked - - - why does mine not want to work?

As indicated in the proffered document I created a user (using useradd) on the text container. The first time I tried to log into the container using x2go it complained about there not being a password for the user. So I went back to the container and gave the user a password. Didn’t think that that would cause a problem.

I have been running different searches trying to find something that makes sense that will tell me how to modify sshd_config to permit longin using passwords. I can find a plethora of pages detailing how to set up sites so that a password is NOT needed but even going over 60 items deep I can find nothing that might assist. Man pages are generally quite cryptic becoming largely unusable by the non-expert so I haven’t consulted them.

Logging in: x2go asks for session parameters (including address user and port), when a connection is called for there is a request for the user name and password (for the anticipated connection).

I have, I think, two other containers where I have set up x2go to connect to the container and its working fine. These connections were done at least 6 if not 8 to 10 weeks ago and I’m not remembering all the details of what I did. I do know that I used the two pages that Simos has in his blog (one on connecting using ssh and the other on using x2go to connect) as resources. As I didn’t seem to have a lot of problems last time in getting things working I’ve been surprised at being unable to get things working this time.

Thanking you for your assistance.

x2go still is complaining about a protocol mismatch. The blasted information is available for maybe 5 seconds and I can’t read all of it in that time.

Any suggestions as to where further problems may be uncovered?

will freeze the screen

will unfreeze

Sorry - - - I don’t understand what ‘will unfreeze’ means in this context.

“protocol mismatch” is different from wrong password.
When the error appears, press Prints teen on the keyboard and it will make a screenshot.

Sorry - - - PrtScn button doesn’t produce any kind of usable result (nothing happens).

I’m presently running Xfce4 because x2go is so far behind on Qt development. I think I will be moving back to lxde which I understand at least even though I am stuck with lxde. Really would like x2go to get to Qt5 but I think that’s a forlorn hope!

I started the whole thing from the beginning, even downloaded a new copy of debian-sid . Still can’t affect a connection yet I can connect to containers running debian stretch and buster - – that’s what is making this so very frustrating.

Thank you for your responses mr brian!!

from an X2GO bug report here is another thread you could read thru.

https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1117

This was quite the help - - - direction on how to kill the ‘possibly’ offending instance followed by directions implying that the requester really didn’t know how to use x2go then followed by a shameless plug for paid support. Given the dearth of actual communication on the forum (I subscribed when I started using x2go) it would seem that there is a none to gentle push to a purely paid support model. Closed source whilst pretending to still be open source imo.

Anyway… I do not believe this is an LXD problem but something in your configuration of the x2goserver or >in the profile you created in the x2goclient.

I would highly suggest asking about it on the x2go-users mailing list.

https://wiki.x2go.org/doku.php/news:latest-list-postings Subscription

Thanks for the tips.

many of the x2go developers have been working on a new project called Arctica

But I have to say that X2GO developers & the mailing list have always been very good. I’ve used x2go for years and have had many chances to engage with Heinz, Stefan et al. They’ve always been great.

They’ve never asked for money but for some problems/projects users contact them about they do make sure that if that person’s company needs to have some extensive work done (code, config etc) that the x2go devs are available for consulting work…

I don’t see anything wrong with that!

@bmullan

some x2go troubleshooting steps:

Could you run the following four tests on the terminal of both the affected and the unaffected machine and >compare the output for each test between affected and unaffected?

ssh non-root-userID@ip-of-x2goserver

This has been done for every container attempt and has always ‘worked’.

See if the connection works and if you see a banner message. Make a
copy of the banner message if there is one, so you can compare it.

ssh root@ip-of-x2goserver

This requires ‘root’ to have a password which by definition, in lxd, it doesn’t have - - - so was unable to complete for any one of the 3 instances.

See if the connection works and if you see a banner message. Make acopy of the banner message if there >is one, so you can compare it.

ssh -X non-root-user@ip-of-x2goserver

type “xterm” after you see the shell prompt, see if XTerm comes up and there are no error messages on >the console. NOTE: the “-X” tells SSH to redirect gui on the x2goserver back to the client

The results for this were interesting - - with 3 different results - - - perhaps these results will assist in the troubleshooting.
#1
root@debianbase:/var/log/lightdm# ssh -X memyself@192.168.1.111
memyself@192.168.1.111’s password:
Linux debian-sid-gui 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jun 2 15:11:59 2018 from 192.168.1.67
/usr/bin/xauth: timeout in locking authority file /home/memyself/.Xauthority
$ xterm
X11 connection rejected because of wrong authentication.
xterm: Xt error: Can’t open display: localhost:10.0
$ exit

#2

root@debianbase:/var/log/lightdm# ssh -X memyself@192.168.1.76
The authenticity of host ‘192.168.1.76 (192.168.1.76)’ can’t be established.
ECDSA key fingerprint is SHA256:ipneCxXo3mmUyw/iGjC3snPlALQIa+akyvszGTDBBqs.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.1.76’ (ECDSA) to the list of known hosts.
memyself@192.168.1.76’s password:
Linux my-debian-sid-gui 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed May 30 13:26:37 2018 from 192.168.1.67
/usr/bin/xauth: timeout in locking authority file /home/memyself/.Xauthority
$ xterm
X11 connection rejected because of wrong authentication.
xterm: Xt error: Can’t open display: localhost:10.0
$ exit

These first 2 instances seem to have similar difficulties.
#3

root@debianbase:/var/log/lightdm# ssh -X memyself@192.168.1.197
Password: root@debianbase:/var/log/lightdm# ssh -X darald@192.168.1.197
Password:
Linux my-debian-sid-gui2 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
root@debianbase:/var/log/lightdm# ssh -X memyself@192.168.1.197
Password:
Linux my-debian-sid-gui2 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

The programs included with the Debian GNU/Linux system are free software;root@debianbase:/var/log/lightdm# ssh -X memyself@192.168.1.197
Password:
Linux my-debian-sid-gui2 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jun 1 07:45:51 2018 from 192.168.1.131
/usr/bin/xauth: timeout in locking authority file /home/memyself/.Xauthority
$ xterm
-sh: 1: xterm: not found
root@debianbase:/var/log/lightdm# ssh -X memyself@192.168.1.197
Password:
Linux my-debian-sid-gui2 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jun 1 07:45:51 2018 from 192.168.1.131
/usr/bin/xauth: timeout in locking authority file /home/memyself/.Xauthority
$ xterm
-sh: 1: xterm: not found

Note that just ‘password’ is asked for - - - there is no mention of the ‘userID’

ssh -X root@ip-of-x2goserver

type “xterm” after you see the shell prompt, see if XTerm comes up and there are no error messages on >the console

If you don’t see the Xterm gui window (from the x2goserver) presented to you then you have something >mis-configured on the x2goserver like no desktop installed, no .xauthority file etc.

The first and third instances lxde was installed (for desktop) and with the 2nd the instructions which used Mate was followed for a desktop. Neither option seemed to change results.

It seems to be likely that what is missing is an .xauthority file.

Trying to figure out where the issue is or what is causing the problem i check inside on of my containers:

$ lxc exec my-debian-sid-gui bash
root@my-debian-sid-qui:~# xauth
xauth: file /root/.Xauthority does not exist
Using authority file /root/.Xauthority
xauth>

whereupon I exited.

So - - - it would seem that this is not purely a x2go matter. It would seem that the lxd container function somehow, perhaps, impedes the ‘system’ from having an .Xauthority file.

How do I create one?
I assume it would read /root/.Xauthority for a location.

Please advise.

Thank you for a very timely response.

I, too, do not see difficult anything with the x2go devs mentioning their availability for consulting work - - - BUT - - - the answer proffered in the report was incomplete and very cursory. With that kind of response I would have a hard time justifying myself spending money to try to achieve a result. Rather the response suggested to me that for money they would be quite willing to run up a tab and based on the previous results offered - - - well they were quite unconvincing for me.