Live data from Hacker News

How I spend my first 5 minutes on a server

plusbryan.com

21–30 of 355 posts

Re: How I spend my first 5 minutes on a server

#22
post #18

Beginner 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. [1] http://linux.die.net/man/8/visudo

Similarly "ufw allow from {ipaddress-you-will-access-from} to any port 22" sounds like a good way to accidentally lock yourself out unless you have an out of band backup

While true, I'd like to note that the article's author does have OOB access.

Re: How I spend my first 5 minutes on a server

#25

Beginner 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. [1] http://linux.die.net/man/8/visudo

You're absolutely right. Thanks for catching that!

Re: How I spend my first 5 minutes on a server

#28
post #21

I also recommend changing the default SSH port.

I hate it when people do that, myself. Especially when you have a lot of other tools, many of which don't take port arguments easily.

IMO best practice is to firewall off everything except some bastion hosts or VPN gateway.

Re: How I spend my first 5 minutes on a server

#30
post #28
post #21

I also recommend changing the default SSH port.

I hate it when people do that, myself. Especially when you have a lot of other tools, many of which don't take port arguments easily. IMO best practice is to firewall off everything except some bastion hosts or VPN gateway.

Totally agree. If you stick to good security practices, working around a non-standard port is an unnecessary annoyance imho.
Post reply on HN