sshcfg-lint
Lint your OpenSSH client config (~/.ssh/config). In ssh_config the first value found for an option wins, so a Host * block placed above a specific host silently overrides it. sshcfg-lint finds that and other common mistakes. Stdlib only, Python 3.9+.
Checks
- an option in a
Host xblock overridden by an earlier matching block (the classicHost */Usertrap) - duplicate
Hostpatterns and options repeated within one block IdentityFile/CertificateFilethat do not exist; private keys readable by others; config writable by others (ssh refuses these)ProxyJumploops or hops with no matchingHost- deprecated options (
UseRoaming,Protocol, ...)
Usage
$ sshcfg-lint
/home/me/.ssh/config:7: warn: user 'deploy' for web is overridden by 'root' at line 2 (Host * (line 1)); first match wins
/home/me/.ssh/config:12: error: ~/.ssh/id_work is accessible by others (mode 0o644); ssh will refuse it
$ sshcfg-lint --strict other_config # exit 1 on warnings too
Options: --no-files (skip disk checks), --strict. Exit code 1 on errors, 2 if the file is unreadable. Not checked: Match blocks and Include.
Install
pip install sshcfg-lint (once published) or copy sshcfg_lint.py.
Support
MIT licensed. If it saves you time: https://paypal.me/RafalBaranowski
Metadata
Release files for sshcfg-lint 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sshcfg_lint-0.1.0.tar.gz | 5.7 kB | Without provenance | Details for sshcfg_lint-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sshcfg_lint-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sshcfg_lint-0.1.0-py3-none-any.whl |
Total release size: 11.2 kB
Release files / sshcfg_lint-0.1.0.tar.gz
| Download URL | sshcfg_lint-0.1.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91255619fafbac623b69204ce61b8b6b6512c2757bf0dfd1a7d4b21b26b26bc2
|
|
BLAKE2b-256 checksum How to use checksums |
12247dac874a38800cd5323bed560c13f99211e5da786e930e4dec60fd9c5cc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / sshcfg_lint-0.1.0-py3-none-any.whl
| Download URL | sshcfg_lint-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e12320ba1a1e8caf0201c0d4178dcb6004c7dab2ed95e4cc2099219a80e175a
|
|
BLAKE2b-256 checksum How to use checksums |
42e7c0fa51964739a4bea869f6ba6af0fcfeb9692266167a533aca7633047cdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for sshcfg-lint 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.