How I spend my first 5 minutes on a server
plusbryan.com
How I spend my first 5 minutes on a server
1–10 of 355 posts
Re: How I spend my first 5 minutes on a server
#2I like the KISS aspect of this, though for accountability purposes, I prefer each user to have their own account.
One correction for you: the sshd_config lines should have no "=" symbol.
Re: How I spend my first 5 minutes on a server
#3The first five minutes on any of my servers involve giving it a name, installing puppet and adding the server name to my central puppet config.
You seriously do this by hand for every server? That seems error prone and a huge waste of time when tools like puppet and chef exist.
Re: How I spend my first 5 minutes on a server
#4[deleted]
Re: How I spend my first 5 minutes on a server
#5I dunno about this guy but apt-get update/apt-get upgrade takes upwards of 15 minutes on new installs (as does yum upgrade on rhel-compatible systems). Kinda eats up into my first 5 minutes on a server.
Re: How I spend my first 5 minutes on a server
#6While I agree these practices seem pretty safe/standard, it's still enough manual work that many people will just skip half of it out of laziness for small projects.
Does anyone have good reusable Puppet (or bash scripts) published that they use on all new servers?
Re: How I spend my first 5 minutes on a server
#7The first five minutes on any of my servers involve giving it a name, installing puppet and adding the server name to my central puppet config. You seriously do this by hand for every server? That seems error prone and a huge waste of time when tools like puppet and chef exist.
I think the author meant for this to be a simple set of security guidelines for beginners. But yeah, any reasonably large prod stack should probably be deployed and setup with puppet and what not. It's DRY and less error prone than a human low on sleep.
Re: How I spend my first 5 minutes on a server
#8[deleted]
Re: How I spend my first 5 minutes on a server
#9Nice writeup. Although I prefer to automatically configure using Chef, I didn't know of fail2ban and logwatch -- I will definitely look into those.
Also, since this post is for beginners, you should mention about restarting the sshd over the lish tty and not over the ssh ptty.
Re: How I spend my first 5 minutes on a server
#10Beginner or not, you should probably use visudo [1] instead of
vim /etc/sudoers
for the sanity checks that it provides, if nothing else. A botched edit of /etc/sudoers that locks you (along with every other user) out of administrative access is an unpleasant way to learn this.