rM-docker icon indicating copy to clipboard operation
rM-docker copied to clipboard

SSH log in requires password

Open fenollp opened this issue 2 years ago • 8 comments

Readme says:

# Now login using the root account, no password
# Or ssh:
ssh root@localhost -p 2222

but with

ssh root@localhost -p 2222

a password is required.

Note: the password also changes at each new docker run --rm -it ..

fenollp avatar Oct 09 '23 14:10 fenollp

Did you run xochitl?

Eeems avatar Oct 09 '23 16:10 Eeems

Indeed, running xochitl will change the root password on first run. We can probably have the script log it, or somehow prevent xochitl from setting it

timower avatar Oct 10 '23 09:10 timower

Yes this is when I'm running xochitl. I'd be happy with solution that SSH-logins with my local/given via env SSH key.

fenollp avatar Oct 10 '23 13:10 fenollp

Perhaps setting up something similar to sshpiper to handle the authentication from the container to qemu would be a good solution? That way you can setup a SSH key between the container and qemu, and then dynamically map in the authentication that you would use to connect from the host system to sshpiper as part of creating the container.

Eeems avatar Nov 11 '23 20:11 Eeems

xochitl calls usermod -p to set the password, we could also prevent that.

timower avatar Nov 11 '23 20:11 timower

Adding ssh -o StrictHostKeyChecking=no root@localhost 'rm /usr/sbin/usermod' to Dockerfile at line 150 prevents xochitl from calling usermod, allowing ssh login without password.

FluffLescure avatar Feb 16 '24 13:02 FluffLescure

that's probably not a good idea

StarNumber12046 avatar Mar 01 '24 15:03 StarNumber12046

just make it log it

StarNumber12046 avatar Mar 01 '24 15:03 StarNumber12046