Help! My SSH and Sudo Permissions are Messed Up on My Home Server

0
3
Asked By CleverPotato92 On

I'm running an Ubuntu live server (22.04.3) on an old laptop to host files, kind of like my personal Google Drive and media server while I'm at school. Before I left for uni, everything was working fine, and I could SSH into it from my home computer. But now, I'm getting a "connection timed out" error. On top of that, the sudo permissions are all messed up. When I run any sudo command, it says "/usr/bin/sudo must be owned by a group" along with some other ownership issues. I tried using commands like `sudo chown root:root (path)` to fix it, but instead, I think I broke sudo entirely. I'm really at my wits' end and could use some help!

3 Answers

Answered By FutureFixer On

For the long term, just a heads up: if permissions are really messed up, a fresh install might save you a ton of headache down the road. I know you don't want to hear it now, but manually adjusting permissions can lead to more complications—better to start clean when you can.

CleverPotato92 -

But my setup was so perfect and I have custom SSH keys! Can't let them go so easily!

Answered By TechGuru007 On

First, if you still have any sort of access, make sure the SSH service is actually running. You can check its status using `systemctl status ssh`. If it's not running, try starting it with `sudo systemctl start ssh` if you have access. Also, you might want to double-check the ownership of essential files. For example, ensure that `/usr/bin/sudo` is owned by root with `sudo chown root:root /usr/bin/sudo`. Also, check your firewall settings; sometimes the SSH port needs to be specifically allowed. And make sure your home router is set up to route external requests to your home server properly!

CuriousBee23 -

Thanks for this! Just to clarify, I can't run any sudo commands right now since permissions got messed up. The status of SSH is enabled, and I did remember to open the firewall, but the person at home couldn't reload it because they got busy.

Answered By UniITSupport On

Just a thought, but if you're using a hostname instead of the direct IP, your university might have DNS filtering in place that could prevent SSH connections. You might want to check if using your IP address directly works. Also, how about trying a mobile hotspot for your connection? That sometimes bypasses campus restrictions.

HomeServerHero -

I am using `ssh [email protected]`, so that shouldn't be an issue. I've also tried using a hotspot, but that didn't work either.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.