Comment on I’m looking for the best remote access solution that works for me
lntl@lemmy.ml 12 hours agoIMO ssh is the tool you’re describing. My ssh server is exposed to the WAN and is configured like this:
- set to a random port to reduce spam (completely eliminated it for me)
- set
PasswordAuthentication no - set
PermitRootLogin no
7EP6vuI@feddit.org 10 hours ago
why no root login? how do you become root if you need it?
lntl@lemmy.ml 9 hours ago
IMO there’s no reason to permit root login via ssh in any circumstance, ever, in all cases, absolutely.
For all the people thinking, “well the world doesn’t work in absolutes, there’s always a special case!” There isn’t.
If a user needs to use elevated permissions, there are many ways to do that without exposing root. sudo(8) is one way to do that.
DougPiranha42@lemmy.world 9 hours ago
Thanks for the great explanation! Seems like because logging in as root is never necessary and indeed never done; people confuse sudoer for root login.
7EP6vuI@feddit.org 9 hours ago
do you use sudo with a password? this and the unknown username is what get as additional security then?
Guiorgy@lemmy.ml 4 hours ago
Without root user login, the attacker would have to guess not only the password to the user but also the username (hopefully it’s not something simple like admin), and once you are logged in you can use sudo -i to chage into root, which will require a password, therefore, we also disable password login so if someone does manage to somehow compromise the SSH user, they’d still need the password to become root.
lewy@lemmy.world 9 hours ago
sudo -iis what I would do orsu rootif your other user is not a superuser.