Earlier quoted context omitted.
For #4, wouldn't the only change when someone leaves the organization be to remove their key from authorized_keys for the shared account? Why would anyone else have to be updated?
It's a basic principle of security. Each account represents one person so that you have a full audit of who did what by watching the activity of a given user account. If everything is run as "devops" user for example, you have no idea who actually performed a given task. Was it Bill, or was it an automated job? PCI-DSS requirements also affect your model for user accounts (hint: shared users are often not compliant).…
How I spend my first 5 minutes on a server
111–120 of 355 posts
Re: How I spend my first 5 minutes on a server
#112The 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.
Puppet and Chef are yet another thing to learn and maintain, if the guy is a part-time admin with a lot of other responsibilities and a small number of servers it may not be worth it.
Speaking from experience as a part time admin, it is definitely worth it to automate the process, even with one or two servers. Any build system will repay in spades the first time you have to set up a new server or rebuild an old one, esp. if you're in a hurry after a server failure.
That said Linode offers other easier options (Linode specific of course). You can take the commands usually executed, and put them in a shell script in the language of your choice which is uploaded and executed on first run (they call this StackScripts - there are lots of examples and helper scripts on their site, but the scripts are really very basic). It's perhaps easier than learning a DSL as it's just codifying the same commands you would run via ssh by hand. You can also clone nodes so you could set one up in a known good state and clone that each time.
This does tie you to linode, so long term one of the other options available would be worth looking in to.
Re: How I spend my first 5 minutes on a server
#113The premise of this thing is not good advice. 1) Your first couple minutes on a server should be used to install a configuration management client, if your bootstrap policies somehow don't already install one. 2) Everything else listed in this document should be configured by a configuration management system. 3) "User account sync tools" should have no place in a modern infrastructure, you should use your configurat…
Is there a free and recommended configuration management system that does all this?
Re: How I spend my first 5 minutes on a server
#114Earlier quoted context omitted.
Sure, it'll not stop dedicated manual intrusion attempts, but it will actually prevent a ton of automated bots from even just trying to connect with common passwords through SSH.
Worth looking at: http://bsdly.blogspot.com/2013/02/theres-no-protection-in-hi...
Now the logs are clean from automated login bots, the only thing left are real dedicated hacking attempts that is worth pursuing further.
Re: How I spend my first 5 minutes on a server
#115Re: How I spend my first 5 minutes on a server
#116Re: How I spend my first 5 minutes on a server
#117What do you about all of those chinese hackers hitting your sshd server. I have 30 different ips and fail2ban doesn't seem to ban them.
Just curious. Have you enabled password logins on your servers, or do they only allow RSA key-based logins?
The hackers fail according to sshd but logwatch lists a list of chinese and russian attempts.
I was hoping my firewall would block them. I tried entering a block of ips but some of the same ones are connecting.
I don't know what this means:
Illegal users from: undef: 20 times 183.60.177.246: 7 times 217.14.134.68: 7 times 219.149.30.170: 6 times
Re: How I spend my first 5 minutes on a server
#118 > ufw enable
> ufw default deny
This way, after I log in, I will not allow anyone else to connect to my machine (I've had instances when by the time I changed my root password "bad guys" had already tried to connect to my machine).Of course after I do the server setup (which is usually a script that will change ssh ports, install packages, etc) I will allow other services in ufw.
Re: How I spend my first 5 minutes on a server
#119 PasswordAuthentication no
really that necessary if a strong password is used?Honestly, being a private key screw-up away from never being able to log in again scares me a little.
Re: How I spend my first 5 minutes on a server
#120Is there a benefit of using ufw instead of iptables?