Sometimes i take on to setup infrastructure for projects i’m on to test things out in a safe space. And if i’m to call myself a proper DevOps professional i must know how to handle the systems i advocate. However, i have a awful memory, and i often forget what systems i host where. So i have gotten into a habit of letting my servers both tell me who they are.
Name your servers and display as banners
Every half-decent server-administrator names their servers after a pattern. I use the NATO Phonetic Alphabet since my first laptop i paid for myself. I’m down to Lima today. Everything gets more personal once you name it. It helps a little, but having names tells me nothing of what i’m running on them or what sites they power. I usually keep the names of the server in the SSH banner. You can configure it by editing the sshd_config:
sudo vi /etc/ssh/sshd_config
Also add or uncomment:
Then i and put the name in it. As soon as i enter a username then i’m shown the name of the server.
login as: poweruser #================================+ | _ | | | | | | | |__ _ __ __ ___ __ __ | | | '_ \| '__/ _` \ \ / / _ \ | | | |_) | | | (_| |\ V / (_) ) | | |_.__/|_| \__,_| \_/ \___/ | | | #================================+
Make sure you restart the ssh service for the changes to take effect.
sudo /etc/init.d/ssh restart
Using Message Of The Day to describe services
I also add a MOTD to describe the server as soon as i’m logged on, this is not exposed before being logging in to machine so i don’t expose anything unneccessary about my system.
sudo vi /etc/motd
firstname.lastname@example.org's password: #============================================ | Logged on to BRAVO | | Serving domains: | - lekplatserna.se | - 05ten.se | - services.05ten.se | | Reverse-proxy for: | - media.05ten.se | - code-quality.05ten.se | - ci.05ten.se #============================================= poweruser@BRAVO:~$
The tricky part is to remember to modify them as soon as i add services. 🙂