I have SSH key access to my homelab ubuntu machine from my main computer and I didnt have to use the password for months. Now I am trying to access the machine from my laptop but I have forgotten the password. Is there a way to reset the password from my main computer while SSH'ed into it? I can not sudo due to this.
Or the only way is the physical way by mounting during boot?
docker run -it -v /etc:/etc ubuntu:$(lsb_release -sd)
to get a root shell in the container with access to your system's/etc
, and then change the password to whatever you want – muru Dec 24 '23 at 15:56-sr
to get the version number as the tag usinglsb_release
and not-sd
, my bad. Good to know you have fixed it. Since you needed to do additional things on top of my suggestion, consider posting an answer detailing exactly what you did. – muru Dec 25 '23 at 00:51