
How to Audit SSH Logins and Failed Attempts the Safe Way
Audit SSH logins on Linux: read auth logs and the journal, count failed attempts, list successful logins by key, spot invalid users and raise the log level.
SSH keys and tunnels, curl, DNS lookups and port checks, for when a connection will not come up.

Audit SSH logins on Linux: read auth logs and the journal, count failed attempts, list successful logins by key, spot invalid users and raise the log level.

Use a FIDO2 hardware key for SSH: generate an ed25519-sk key, choose resident or not, require touch and PIN, use it on new machines and keep a backup.

Write an SSH client in Go with golang.org/x/crypto/ssh: key or agent authentication, verified host keys through known_hosts, timeouts and running a command.

Write a simple concurrent TCP port scanner in Go with net.DialTimeout, a bounded worker pool, sorted results and notes on filtered versus closed ports.

Use scp and sftp to copy files over SSH, with ports, keys and recursive copies, learn how scp changed in OpenSSH 9, and when to use rsync instead.

Use VS Code Remote SSH and Dev Containers: connect with your ssh config, devcontainer.json, features, ports and the problems to expect.

Set up a remote dev machine and edit over SSH: host config, connection reuse, tmux, port forwarding, editors over SSH and file sync.

Fix SSH no matching host key type found: why SHA-1 ssh-rsa was disabled, reading the server offer, HostKeyAlgorithms overrides, and re-keying.

Fix SSH no matching key exchange method found: read the server offer, old server versus new client, safe KexAlgorithms overrides and upgrades.

Fix the SSH unprotected private key file warning: set mode 600, fix ownership, handle WSL and Windows mounts, and see why open keys are refused.

Understand SSH Host key verification failed: every cause, from a changed key or unwritable known_hosts to a non-interactive session, with the fix for each.

Change a Git remote URL from HTTPS to SSH with git remote set-url: find the SSH address, test the connection, and fix credential and key problems.
One email when a new post is published. No spam.