
How to Use Webhooks to Trigger Shell Scripts the Safe Way
Trigger a shell script from a webhook safely: verify the HMAC signature, avoid passing request data to the shell, lock down the user, and respond fast.
SSH, curl, DNS, ports and HTTP APIs from the terminal, for when a connection or a request will not behave.

Trigger a shell script from a webhook safely: verify the HMAC signature, avoid passing request data to the shell, lock down the user, and respond fast.

Add two factor authentication to SSH with a TOTP app: install the PAM module, enrol users, require a key plus a code, and keep a way back in.

Change the SSH port and limit users in sshd_config without locking yourself out: firewall first, Ubuntu socket activation, SELinux and AllowUsers.

Publish Docker ports safely: the difference between EXPOSE and -p, binding to localhost, the firewall bypass, random ports and how to check what is listening.

Understand Docker networks and container DNS: why the default bridge has none, how user defined networks resolve names, aliases, and reaching the host.

Use SSH keys with a password manager agent: keys stay in the vault, the agent signs with approval, and Git signing and forwarding limits are covered.

Troubleshoot SSH with ssh -v: read the output from the top, spot key offers and refusals, compare config with ssh -G and debug the server side.

Harden sshd: disable password login, restrict root and users, shorten the attack window with a drop-in file, and test safely without locking yourself out.

Cache API responses in shell scripts: a keyed file cache with a TTL, conditional requests with ETag, atomic writes, stale fallback and what not to cache.

Use gRPC from the terminal with grpcurl: list services through reflection, describe methods, call with JSON, use TLS and metadata, and stay safe.

Use WebSockets from the terminal with websocat: connect, send text, read a stream with jq, set headers, run a test server and keep connections alive.

Query JSON columns from the shell in PostgreSQL, MySQL and SQLite: extract fields, filter, expand arrays, return clean output for scripts and pipe rows to jq.
One email when a new post is published. No spam.