I could not log into my laptop (running on Ubuntu) yesterday. Every time I entered my password — a password I haven’t changed in years — I was returned to the same login screen all over again! But I could log into a console by pressing CTRL+ALT+F1, so it was definitely not a typo-in-the-password error. Since I always have a second user account on my PCs, it was also easy for me to verify that I could log in (in desktop/graphical mode) as a different user without any difficulty.
After I “upgraded” Fedora (to Fedora 19) on my main PC recently, I only had one other essential post-installation task to complete before I could get back to my regular programming on this machine. I just had to install the
pecl_http PHP extension next.
A couple of days ago, I “upgraded” Fedora on my main PC and everything seemed to be working really well until I tried to set up a local development version of one of my sites back on the machine.
I use SSH a lot, and I mean, A LOT! Because I manage 3 other servers, and they are located in different parts of the world, I rely completely on SSH to keep them up and running optimally.
These days I’m trying to develop a BASH script to help me copy quickly my MySQL database from my (live) remote site straight into my PC, where I do all my development work. Right at the top of the script I was writing, I needed a way for the script to figure out if the (development PC‘s) MySQL server (mysqld) was already started and running. And if not, to let me know.
One effective method to mitigate brute-force attacks and attempts to break into your public server via the SSH daemon is to use the appropriate iptables rule that will handle such abuse. There are a couple that do the job really well but the one I personally use is one that works on both, dedicated and virtual, servers.
Every time I set up a server, the very next thing I do is secure the Secure SHell Daemon (sshd).
My checklist for doing that looks something like this:
If, like me, you want to easily have some program start every time you boot up your Linux server, you need to find and edit the
rc.local file in your file-system.
/etc/rc.local is really a simple place to put shell commands and/or scripts you want to run when booting up.
Earlier today I implemented stricter iptables rules on this web server – finally completing one essential task I have been ignoring for so long. Minutes later, just when I was beginning to feel good about myself, on a remote server some place else, the Webmin System and Server Status module there was reporting that it could no longer access this server!
Recently, I needed a simple PHP function that will match an IP Address in a CIDR block.