Score:0

X2Go Public Key Authentication not working in Ubuntu 22.04

sd flag
Software Versions:
X2Go Client 4.1.1.1
Ubuntu 22.04

I've been using X2Go on AWS for a couple years. X2Go client is installed on my workspace, and I run the server on EC2 instances to allow graphics. If I don't need to run graphics I just ssh into the EC2 instance from an xterm since public key authentication is setup.

I recently upgraded from Ubuntu 20.04 to 22.04 on my EC2 instances. The public key authentication in X2Go doesn't work in 22.04. I went back and verified that it works fine in 20.04. I had always used the "Use RSA/DSA key for ssh connection:" box with nothing below it checked. I have tried just that box, that box plus "Try auto login (via SSH agent or default SSH key)" checked, and just "Try auto login (via SSH agent or default SSH key)" checked with nothing in the "Use RSA/DSA key for ssh connection:" box. When I try and login it always pops up a box asking for my password. Session Preferences

Has anyone else experienced this? Is there a work around?

Thanks,

Gene

us flag
What does /var/log/auth.log tell you about the problem?
geenweb avatar
sd flag
Thanks Robert. It logged "userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms". So I looked up PubkeyAcceptedAlgorithms and saw in the sshd_config 5 man page that PubkeyAcceptedAlgorithms is used to set the key type in /etc/ssh/sshd_config. So I went into that file and uncommented the "PubkeyAuthentication yes" line, and added a "PubkeyAcceptedAlgorithms +ssh-rsa" line. I then rebooted the instance. It no longer asks for a password.
geenweb avatar
sd flag
But now I get a "Connection failed. bash: line 1: x2golistsessions: command not found" LoL. I haven't started debugging that yet. Any hints welcome. I'll list what I find. Best, Gene
us flag
try sudo apt-get install x2goclient
Score:1
sd flag

The "Connection failed" error was because I was using an ancient install script that did not work correctly. Yes, a reinstall fixed that issue. Then I got a strange “Authentication is required to create color managed device” popup message. I implemented a fix I found online creating a file named /etc/polkit-1/localauthority.conf.d/ containing

polkit.addRule(function(action, subject) {
 if ((action.id == "org.freedesktop.color-manager.create-device" ||
 action.id == "org.freedesktop.color-manager.create-profile" ||
 action.id == "org.freedesktop.color-manager.delete-device" ||
 action.id == "org.freedesktop.color-manager.delete-profile" ||
 action.id == "org.freedesktop.color-manager.modify-device" ||
 action.id == "org.freedesktop.color-manager.modify-profile") &&
 subject.isInGroup("{users}")) {
 return polkit.Result.YES;
 }
 });

X2Go works correctly now, but it seems to be running a bit slow. Anyway, the fix to the original authentication issue is in the comments above. Uncommented the "PubkeyAuthentication yes" line, and added a "PubkeyAcceptedAlgorithms +ssh-rsa" line in /etc/ssh/sshd_config.

Thanks Robert

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.