Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
sshconfig-lint — Rule-based linter for OpenSSH client config files that detects duplicate hosts, missing identity files, weak algorithms, wildcard ordering issues, and dangerous settings with JSON output and CI-friendly exit codes. | Kitploit
工具/GitHubGitHub/noah4ever/sshconfig-lint
General Purpose UtilitiesStatic AnalysisCode AnalysisConfiguration AuditingNetwork SecurityDevSecOps
GitHubnoah4ever/sshconfig-lint

sshconfig-lint

Rule-based linter for OpenSSH client config files that detects duplicate hosts, missing identity files, weak algorithms, wildcard ordering issues, and dangerous settings with JSON output and CI-friendly exit codes.

查看仓库
161464天前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
内容在请求的语言中不可用。显示英文版本。

sshconfig-lint

Tests crates.io License: MIT

One engine for every place your SSH config changes.

sshconfig-lint finds semantic mistakes in OpenSSH client configs: duplicate hosts, broken identity paths, unsafe options, weak algorithms, wildcard ordering, and tangled Include chains. Use the same rule codes locally, in Git hooks, GitHub Actions, and editors.

Try the private browser playground · Learn with interactive examples · Read every rule

The browser checker runs on your device. Config contents are not uploaded and no telemetry is collected.

Quick start

root@kitploit:~
# check ~/.ssh/config
sshconfig-lint

# check one or more repository configs
sshconfig-lint .ssh/config infrastructure/ssh_config

# fail on warnings and errors
sshconfig-lint .ssh/config --strict

Install

Homebrew

root@kitploit:~
brew tap Noah4ever/tap
brew install sshconfig-lint

Cargo

root@kitploit:~
cargo install sshconfig-lint

Arch Linux

root@kitploit:~
yay -S sshconfig-lint-bin

The release page provides verified binaries for Linux, macOS, and Windows. The convenience installer verifies the release checksum before installing:

root@kitploit:~
curl -fsSL https://raw.githubusercontent.com/Noah4ever/sshconfig-lint/main/install.sh | bash

Set VERSION=v0.5.0 or INSTALL_DIR=~/.local/bin to override the defaults.

GitHub Actions

The official Action is available in the GitHub Marketplace.

root@kitploit:~
name: SSH config
on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Noah4ever/[email protected]
        with:
          paths: |
            .ssh/config
            infrastructure/ssh_config
          strict: true

Findings appear as annotations on the exact file and line. The Action downloads the release matching its tag and verifies SHA256SUMS before execution.

For repositories with GitHub Code Scanning enabled, SARIF can be uploaded separately:

root@kitploit:~
- run: sshconfig-lint .ssh/config --format sarif > sshconfig-lint.sarif
- uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: sshconfig-lint.sarif

Pre-Commit

root@kitploit:~
repos:
  - repo: https://github.com/Noah4ever/sshconfig-lint
    rev: v1.0.0
    hooks:
      - id: sshconfig-lint-strict

Use id: sshconfig-lint when warnings should not block a commit. Override files: in your project when configs use another naming convention.

Editors

VS Code

Install the VS Code extension from the Marketplace or run:

root@kitploit:~
code --install-extension NoahThiering.sshconfig-lint

The extension starts sshconfig-lint lsp, downloads a matching verified binary once, and then works offline. It recognizes .ssh/config, ssh_config, and chezmoi's dot_ssh/config. No telemetry is collected. Its source is available in editors/vscode.

Neovim

The tested editors/neovim example uses Neovim's built-in LSP client. Copy its small Lua module into your configuration and start it with:

root@kitploit:~
require("sshconfig_lint").setup()

It uses the same sshconfig-lint lsp server as VS Code and supports a custom binary path.

Any editor with LSP support can start:

root@kitploit:~
sshconfig-lint lsp

The v0.5 language server publishes full-line diagnostics on open, change, and save. Untitled buffers run content-only rules; saved files additionally resolve Include and filesystem paths. Findings from nested Includes are attached to the included file and cleared with the root document.

Output formats

root@kitploit:~
sshconfig-lint --format text
sshconfig-lint --format json
sshconfig-lint --format github
sshconfig-lint --format sarif

JSON findings contain severity, code, rule, line, file, message, hint, and documentation. Rule codes and exit codes are stable automation interfaces.

ExitMeaning
0No error-level finding, and no warnings with --strict
1At least one blocking finding
2At least one requested config could not be read

Rules

The rule guides show the exact broken fragment, a corrected config, why it matters, and how to verify the result with OpenSSH.

INVALID_VALUE checks ports, retry and prompt counters, alive settings, ForwardX11Timeout, RequiredRSASize, ControlPersist, boolean switches, ObscureKeystrokeTiming, OpenSSH time values, StreamLocalBindMask, IPQoS, and documented value sets such as AddressFamily, ControlMaster, StrictHostKeyChecking, LogLevel, and PubkeyAuthentication. Quoted and case-insensitive values accepted by OpenSSH remain valid. The linter accepts modern syntax without trying to infer the version of the SSH client that will consume the config.

Filesystem checks skip paths containing percent tokens or environment variables because their final value depends on the connection context. LOCAL_COMMAND_DISABLED is similarly conservative: it is suppressed when an unresolved Include or any possible PermitLocalCommand yes could make the command effective. Resolve Includes through the normal CLI or a saved editor document for the most precise result.

Development

Requires Rust 1.85 or newer.

root@kitploit:~
cargo test --all
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt -- --check

See CONTRIBUTING.md, the public roadmap, the v1 stability contract, and security policy.

License

MIT

下载工具
CodeRuleSeverity
INVALID_VALUEInvalid directive valueerror
DUP_HOSTDuplicate Host blockwarning
MISSING_IDENTITYIdentityFile not founderror
WILDCARD_ORDERHost wildcard orderwarning
WEAK_ALGOWeak algorithmwarning
DUP_DIRECTIVEDuplicate directivewarning
INSECURE_OPTInsecure optionwarning
UNSAFE_CTRL_PATHUnsafe ControlPathwarning
INCLUDE_CYCLEInclude cycleerror
INCLUDE_DEPTHInclude nesting too deeperror
INCLUDE_READInclude cannot be readerror
INCLUDE_GLOBInvalid Include patternerror
INCLUDE_NO_MATCHInclude matches no filesinfo
NEGATED_HOSTHost has only negated patternswarning
PROXY_CONFLICTProxyCommand and ProxyJump conflictwarning
REVOKED_HOST_KEYS_UNREADABLERevokedHostKeys file is unreadableerror
MISSING_CERTIFICATECertificateFile not founderror
LOCAL_COMMAND_DISABLEDLocalCommand is not enabledwarning
INVALID_TOKENInvalid percent tokenerror
INVALID_SYNTAXInvalid syntaxerror
UNKNOWN_DIRECTIVEUnknown directiveerror
DEPRECATED_OPTIONDeprecated optionwarning
INVALID_MATCHInvalid Match conditionerror
CONTROL_PERSIST_UNUSEDControlPersist without ControlMasterwarning
UPDATE_HOSTKEYS_ASK_PERSISTUpdateHostKeys ask with ControlPersistwarning