brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: ssh-audit tells you which weak algorithms your SSH server still offers

Network and access
~/tips/tip-security-ssh-audit

pip3 install ssh-audit

Checks an SSH server's key exchange, ciphers and keys, and lists what to switch off.

An SSH config that was fine five years ago may still offer algorithms nobody should use now. I’d rather have a tool list them than read cipher names off a wiki.

ssh-audit connects to a server and reports the key exchange, host key, cipher and MAC algorithms it offers, with a security rating and recommendations for each. Install it with pip, Snap or Docker:

pip3 install ssh-audit
ssh-audit localhost
ssh-audit 127.0.0.1:222

The second form is how the README sets a port; -p 222 works too. The output is coloured, with weak algorithms marked as warnings or failures and a list at the end of what to remove or add. Those suggestions go into sshd_config under KexAlgorithms, Ciphers and MACs.

It is handy in scripts as well. The exit code is 0 when everything is considered secure, so you can run it after a config change and see right away if you made things worse.

Caveats. Keep a second SSH session open while you change the server config, so a typo cannot lock you out. Removing algorithms can also break old clients, like an ancient NAS or a router that only speaks old key exchanges. And there is a --dheat option that runs a denial-of-service test: only point that at servers you own. The project is MIT licensed.

Further reading: ssh-audit on GitHub, On this site: passwd -l locks a password, but SSH keys still work

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link