So, you just got your new Linux server and only know the basics to it, great! It's always nice to see people learning Linux. Protip: Get into good habits early, prevents having to correct bad habits later IE using root to login. Update your shit: This is standard procedure when you get your first dedicated server/VPS, run the updaters for the dist. For Ubuntu/Debian based dist: apt-get update;apt-get -y dist-upgrade For CentOS/RHEL based dist: yum update Those commands will update all of your systems packages/apply distribution security patches thus making you more secure both OS side and application side. Add your own user: The second thing you must always do is add your own user account. Using purely root is the biggest mistake all new admin make. root is the single most powerful account on your system and if someone compromises it, you might as well wave goodbye to it all. adduser (your wanted username goes here) So for me it'd be: adduser cbryars This just in from Mace268, apparently CentOS does not ask you for a password for adduser accounts. Once you run the adduser command, run: passwd (your username) This will let you change/add the password for the user account you just created, so for example, for me it would be: passwd cbryars Add yourself to sudo: Now you're probably thinking "So if I can't login as root, how the fuck do I do stuff like update or add new packages?" The answer is sudo. Sudo allows you to change to another user, run aplications as other users and so on. So, first we need to install sudo, if it's not already installed. For Ubuntu/Debian based dist: apt-get install sudo For CentOS/RHEL based dist: yum install sudo Now that you've installed sudo, you'll need to add yourself to the sudoers, this is the easy part. usermod -a -G admin (yourusernamehere) So for me it'd be: usermod -a -G admin cbryars If you run a Debian based dist, you'll need to restart the sudo service for this to take affect, just do: service sudo restart Quick tutorial to sudo! When you're logged into your user you'll want to change users a lot (trust me, it's a godsend) for that you'll want to use sudo -su, for example: sudo -su minecraft This will change your shell to the system username: minecraft All things you run while under sudo -su will be run AS THAT USER, so if you say run java, the process will be under the user minecraft! So say you want to get to root, this is even easier: sudo -s That's it, running that command will elevate you to a root shell and allow you to essentially login as root without logging in a root! If you wish to leave a sudo -su/sudo -s'd shell and get back to your normal user account, just run the command: exit It'll bring you back to your own shell. Modify your SSHd config: Now you're probably thinking "Why would I need to do this? It works, right?" and you'd be right, however a nice touch always is changing a few basic things to boost your security. First of all disable root. You have no idea how many times I have to tell people, disable fucking root, you have sudo so why would you need to login as root? First of all, open up your sshd config: nano /etc/ssh/sshd_config Once you've done that, look for the words "PermitRootLogin" If it says "PermitRootLogin yes", change it to "PermitRootLogin no" What this will do is disable SSH logins to the user root, you have sudo -s, so who cares, you certainly don't . Next step in the same file is to change the port. This is purely optional but it does prevent a lot of annoying bruteforce logs in your /var/log/auth.log Look for "Port 22", it should be somewhere at the top of the file. Change it to some memorable number; for examples sake, 2421, all you change it to is "Port 2421", it's as simple as that. IF YOU DO CHANGE THE PORT, REMEMBER IT. YOU'LL NEED IT TO LOG INTO SSH AGAIN. Then once you've done all that just simply do: For Ubuntu/Debian based dist: service ssh restart For CentOS/RHEL based dist: service sshd restart This will reload your configs! HOREY SHEET, I LOGGED OUT AND NOW I CAN'T LOGIN AS ROOT OMGWTFBBQ As I went over before, you disabled root! Just login as the new user you created, once you do that if you need to get to say the root user, just do sudo -s This concludes the beginner shit, I'll make another post on the more advanced more Minecrafty stuff.