0

I'm using Cockpit 202.1-1 amd64 locally (latest of Ubuntu Oean today) to 2 Debian 10 servers. One works but the new fresh one doesn't, and I can't figure out why.

  • I use the default "debian" user with an rsa key instead of a password. This key is added to my "Authentications" in Cockpit and unlocked. It's the same key for the 2 servers and I'm able to connect via bash/ssh without any problem.

  • I restarted the service, rebooted the machines (local and server), without success

  • On the "unable to connect server", I also created another user to test Cockpit-WS (as I needed a password to login) and it works like a charm.

  • With Debian 10, Cockpit 188 is available from the main repo and 217 from the backports so I enabled them and updated Cockpit but the problem remains

  • In the server logs, no entry speaks about cockpit-bridge or cockpit-ssh

  • To make another test I synced my new user between my two servers (One has Cockpit 217 from backports and the other one still has the 188 one). Surprisingly, it worked in both directions which made me deduce that the the problem comes from my local Cockpit. So I greped the logs and got something interesting: cockpit-ssh XXX.XXX.XXX.XXX: spawning remote bridge failed with 0 status

  • But there is nothing about it on Google: https://www.google.com/search?hl=fr&q=cockpit%20%22spawning%20remote%20bridge%20failed%20with%200%20status%22

  • As a workaround, I will continue to use my "with a password" user, but this would force me to let the 9090 port opened while a local client would have been fine.

Hoping my problem would avoid others to loose their time trying to fix their servers, the issue comes from Ubuntu's Cockpit and maybe, someone would be able to help me to fixe it!

Thanks in advance

Jean Claveau
  • 111
  • 3

1 Answers1

0

I finally understood what appends:

  • On my local Ubuntu, I decided to use "su" and remove my user from the "sudo" group so I could set a weak password without too much security leak.

  • Due to that, I locally logged to Cockpit as root to be "privileged" and able to add servers

  • Logged as root, Cockpit tries to log as... root before asking a specific username for my newly added server and, as it's disabled by default on Debian, it answers Please login as the user "debian" rather than the user "root".. It was in the logs, one line above, but I didn't realized it was the answer of my server's SSH.

To fix it, I forgot my picky "not being myself sudoer", and do not connect to Cockpit as root anymore locally, thus Cockpit proposed me to choose a user and it worked perfectly specifying "debian" and my rsa key.

Cheers

Jean Claveau
  • 111
  • 3