screego / server

screen sharing for developers https://screego.net/
https://app.screego.net
GNU General Public License v3.0
7.62k stars 551 forks source link

Can't exec via console #146

Closed nakda closed 1 year ago

nakda commented 1 year ago

Hi!

I found Screego yesterday and successfully set it up. Thank you for providing this tool!

I have an issue though: after setting everything up I wanted to turn on the authentication for all users (previously set to none for testing), and I actually can't generate the hash because I can't execute any commands within the container.

If I try via Portainer, the screen flashes after clicking on "Connect" then reverts back to the Container Console page without logging me in. If I try with docker exec I ge the following error:

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown

I had to find a bcrypt hash generator online to feed the authentication file, which works, but I still would prefer to go through the expected process.

Any idea?

jmattheis commented 1 year ago

Portainer probably requires a shell to be present, but the screego/server container doesn't have one. You don't have to execute the command on the existing screego container, you can either generate the hash via docker:

$ docker run --rm -it screego/server:1.8.0 hash --name username

or download the binary and then execute ./screego hash with the downloaded binary.

You can also use htpasswd if you've it installed:

$ htpasswd -nBC 12 "username"
nakda commented 1 year ago

Oh got it! My bad for not understanding this part properly. Thanks!