Solaris and Linux
Friday, June 12, 2026
How to check the httpd service is running on multiple hosts using bash and Ansible
Monday, June 8, 2026
Linux Host 2FA Configuration Guide
Two-Factor Authentication (2FA) on a Linux host is commonly configured using Google Authenticator PAM.
1. Install Google Authenticator
RHEL/Rocky/Oracle Linux:
sudo dnf install google-authenticator qrencode -y
Older systems:
sudo yum install google-authenticator qrencode -y
2. Configure OTP for a User
google-authenticator
Recommended answers:
- Time-based tokens: y
- Update .google_authenticator file: y
- Disallow multiple uses: y
- Increase time skew: n
- Enable rate limiting: y
3. Configure PAM
Edit /etc/pam.d/sshd and add:
auth required pam_google_authenticator.so
4. Configure SSH
Edit /etc/ssh/sshd_config and set:
ChallengeResponseAuthentication yes
UsePAM yes
PasswordAuthentication yes
For newer OpenSSH:
KbdInteractiveAuthentication yes
UsePAM yes
5. Restart SSH
sudo systemctl restart sshd
6. Test Login
ssh user@server-ip
You should be prompted for:
- Password
- Verification code (OTP)
Verify Logs:
RHEL:
sudo tail -f /var/log/secure
Ubuntu:
sudo tail -f /var/log/auth.log
Rollback:
Remove:
auth required pam_google_authenticator.so
from /etc/pam.d/sshd and restart sshd.
Kubernetes Cluster Commands
Sunday, May 31, 2026
Networking core concepts
How to Install KVM Packages
Thursday, May 28, 2026
LVM Basics
Friday, May 22, 2026
Wednesday, May 20, 2026
Access mode and Trunk mode.
| Feature | Access Mode | Trunk Mode |
|---|---|---|
VLANs carried | One VLAN | Multiple VLANs |
| VLAN Tagging | No | Yes |
| Used for | End devices | Network devices |
| Traffic type | Untagged | Tagged |
Tuesday, May 19, 2026
Common Linux System Calls
| Category | Examples | Purpose |
|---|---|---|
| File Operations | open(), read(), write(), close() | File handling |
| Process Control | fork(), exec(), wait() | Process creation |
| Memory Management | mmap(), brk() | Memory allocation |
| Device Management | ioctl() | Device communication |
| Networking | socket(), bind(), connect() | Network operations |
| Information | getpid(), uname() | System information |