How to Use login.defs and PAM for Account Lockouts

TL;DR To implement account lockouts on Debian 13 using login.defs and PAM, follow these concise steps: Configure login.defs: Set parameters for account lockout in /etc/login.defs. Adjust the following settings to enhance security: FAIL_DELAY 3 # seconds to wait before retrying MAX_TRY 5 # maximum failed attempts Caution: Setting MAX_TRY too high may expose your system to brute-force attacks. A value of 5 is generally safe. ...

March 15, 2026 · 7 min · The AI Dev

Secure SFTP-Only User Accounts

TL;DR To set up secure SFTP-only user accounts on Debian 13, follow these concise steps: Create a new user: Use the following command to create a user without shell access: sudo adduser --shell /usr/sbin/nologin sftpuser # Replace 'sftpuser' with your desired username Create a group for SFTP users: This helps manage permissions easily: ...

March 15, 2026 · 7 min · The AI Dev

Securing Node.js / Python Apps Behind Nginx Reverse Proxy

TL;DR To secure your Node.js or Python applications behind an Nginx reverse proxy on Debian 13, follow these essential steps: Install Nginx: Ensure Nginx is installed and running. Use the following command: sudo apt update && sudo apt install nginx -y # Install Nginx Configure Nginx: Create a new configuration file for your application in /etc/nginx/sites-available/ and link it to /etc/nginx/sites-enabled/. Use the following template: ...

March 15, 2026 · 9 min · The AI Dev

Security Headers for Web Applications

TL;DR To enhance the security of your web applications on Debian 13, implement the following HTTP security headers. These headers help mitigate various attacks, such as cross-site scripting (XSS), clickjacking, and content type sniffing. Content Security Policy (CSP): Define which resources can be loaded by your application. Start with a restrictive policy and gradually allow necessary sources. ...

March 15, 2026 · 11 min · The AI Dev

Setting Up a Read-Only Root Filesystem

TL;DR To set up a read-only root filesystem on Debian 13, follow these concise steps: Backup Your Data: Always start by backing up your important data to avoid any loss during the process. Modify the Filesystem: Remount the root filesystem as read-only. Use the following command: sudo mount -o remount,ro / Edit /etc/fstab: Change the root filesystem entry to ensure it mounts as read-only on boot. Open the file with: ...

March 15, 2026 · 7 min · The AI Dev

Setting Up DNS over HTTPS on Debian 13

TL;DR Important: This guide covers TWO DNS-over-HTTPS tools. Choose ONE: cloudflared (recommended, simpler) - Use section “Configuring cloudflared for DoH” dnscrypt-proxy (more flexible) - Use section “Installing Required Packages” Recommended Quick Start with cloudflared: Install cloudflared: sudo apt update sudo apt install cloudflared -y Create configuration: sudo mkdir -p /etc/cloudflared echo "proxy-dns: true proxy-dns-upstream: ...

March 15, 2026 · 6 min · The AI Dev

Using Brotli & HSTS Safely with Nginx for Security + Speed

TL;DR To enhance your Nginx server’s performance and security on Debian 13, implement Brotli compression and HTTP Strict Transport Security (HSTS). Follow these steps for a safe and effective setup: Install Brotli: Ensure you have the Brotli module for Nginx. If not installed, you can add it using: sudo apt update sudo apt install nginx-module-brotli After installation, enable the module in your Nginx configuration. ...

March 15, 2026 · 6 min · The AI Dev

How Steganography in Code Could Enhance AI Assistant Security and Privacy

TL;DR Steganography – hiding data within other data – offers a practical approach to securing sensitive information when working with AI coding assistants. Instead of exposing API keys, database credentials, or proprietary algorithms in plain text where they might be logged or transmitted, you can embed them in seemingly innocuous files like images, audio, or even within code comments using whitespace patterns. ...

March 14, 2026 · 9 min · The AI Dev

OneCLI Rust Tool: Secure Vault Management for AI Agents in Linux Systems

TL;DR OneCLI is a Rust-based command-line tool that provides secure credential management specifically designed for AI agent workflows on Linux systems. It addresses the critical challenge of allowing LLMs to interact with infrastructure secrets without exposing plaintext credentials in prompts, logs, or command history. The tool implements a vault-style architecture where secrets are stored encrypted at rest using AES-256-GCM, with access controlled through short-lived tokens and role-based permissions. AI agents receive time-limited access tokens rather than raw credentials, and all secret retrievals are logged with full audit trails. This approach prevents credential leakage when LLMs generate commands or when conversation histories are stored for training purposes. ...

March 13, 2026 · 9 min · The AI Dev

Replit vs GitHub Copilot: AI Coding Features and Performance Compared

TL;DR Replit and GitHub Copilot serve different primary purposes despite both offering AI coding assistance. Replit is a cloud-based IDE with integrated AI features, while GitHub Copilot is an AI pair programmer that works as an extension in your local development environment. GitHub Copilot excels at inline code completion and chat-based assistance within VS Code, JetBrains IDEs, and Neovim. Install the extension from the VS Code marketplace or JetBrains plugin repository, authenticate with your GitHub account, and start coding. Copilot suggests completions as you type and provides conversational help through Copilot Chat. Agent mode in VS Code can handle multi-file edits and complex refactoring tasks. Pricing starts at $10/mo for individuals, with free access for verified students and popular open-source maintainers. ...

March 12, 2026 · 8 min · The AI Dev
Buy Me A Coffee