{"id":17660883,"url":"https://github.com/soulteary/ssh-config","last_synced_at":"2026-03-02T04:07:10.706Z","repository":{"id":258722474,"uuid":"871828791","full_name":"soulteary/ssh-config","owner":"soulteary","description":"1MB size, 99%+ Coverage, Use more expressive YAML / JSON to manage your Config files. --- 1MB大小，99%+ 测试覆盖，使用更具表现力的YAML / JSON来管理您的配置文件。","archived":false,"fork":false,"pushed_at":"2026-03-01T19:50:06.000Z","size":401,"stargazers_count":69,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-01T21:54:24.840Z","etag":null,"topics":["cli","ssh-config","ssh-config-editor","ssh-config-parser","ssh-json","ssh-yaml","sshconfig"],"latest_commit_sha":null,"homepage":"https://soulteary.com/2024/10/15/manage-ssh-configuration-using-structure-data-ssh-config-tool.html","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soulteary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-13T03:53:48.000Z","updated_at":"2026-03-01T19:47:01.000Z","dependencies_parsed_at":"2024-10-20T10:23:26.042Z","dependency_job_id":"93f8096f-56d5-4a8a-8055-f6d708ed6da2","html_url":"https://github.com/soulteary/ssh-config","commit_stats":null,"previous_names":["soulteary/ssh-config","soulteary/ssh-yaml"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/soulteary/ssh-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fssh-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fssh-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fssh-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fssh-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soulteary","download_url":"https://codeload.github.com/soulteary/ssh-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fssh-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29992286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","ssh-config","ssh-config-editor","ssh-config-parser","ssh-json","ssh-yaml","sshconfig"],"created_at":"2024-10-23T17:09:27.757Z","updated_at":"2026-03-02T04:07:10.699Z","avatar_url":"https://github.com/soulteary.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSH Config Tool\n\n[![codecov](https://codecov.io/gh/soulteary/ssh-config/branch/main/graph/badge.svg?token=W816DX12V8)](https://codecov.io/gh/soulteary/ssh-config) [![Go Report Card](https://goreportcard.com/badge/github.com/soulteary/ssh-config)](https://goreportcard.com/report/github.com/soulteary/ssh-config) [![CodeQL Advanced](https://github.com/soulteary/ssh-config/actions/workflows/codeql.yml/badge.svg)](https://github.com/soulteary/ssh-config/actions/workflows/codeql.yml) [![Release](https://github.com/soulteary/ssh-config/actions/workflows/build.yml/badge.svg)](https://github.com/soulteary/ssh-config/actions/workflows/build.yml)\n\n**[中文文档](./README_CN.md)**\n\n\u003cimg src=\".github/github-repo-card.png\" \u003e\n\nSSH Config Tool is a command-line utility for managing SSH configuration files. It allows you to manage your SSH config files using more expressive YAML/JSON formats while still being able to round-trip them back to classic `ssh_config` syntax.\n\n## Features\n\n- Converts YAML/JSON representations into standard SSH config files\n- Converts classic SSH config files into YAML or JSON for easier editing and review\n- Scans a single file or an entire directory tree (such as `~/.ssh`) while skipping key material and other non-config files\n- Supports reading configuration from files or standard input (stdin)\n- Supports output to files or standard output (stdout), creating parent folders when needed\n- Automatically detects the input format (YAML/JSON/SSH Config) and tidies trailing blank lines\n\n## Installation\n\nUse Docker or download the binary file suitable for your system and CPU architecture from the [GitHub release page](https://github.com/soulteary/ssh-config/releases).\n\nAlternatively, you can install it via Homebrew.\n\n```bash\nbrew tap soulteary/tap\nbrew install soulteary/tap/ssh-config\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\nssh-config [options]\n```\n\nRun without arguments to export all SSH configuration under `~/.ssh` to YAML on standard output:\n\n```bash\nssh-config\n```\n\nOr, use Linux pipes to manipulate files:\n\n```bash\ncat input_file | ssh-config -to-yaml \u003e output_file\n```\n\n### Docker\n\nDownload docker image:\n\n```bash\ndocker pull soulteary/ssh-config:latest\n# or\ndocker pull ghcr.io/soulteary/ssh-config:latest\n```\n\nConvert file (test.yaml) in the current directory to YAML (abc.yaml):\n\n```bash\ndocker run --rm -it -v `pwd`:/ssh soulteary/ssh-config:latest ssh-config -to-yaml -src /ssh/test.yaml -dest /ssh/abc.yaml\n```\n\nJust want to see the conversion results:\n\n```bash\ndocker run --rm -it -v `pwd`:/ssh soulteary/ssh-config:latest ssh-config -to-yaml -src /ssh/test.yaml\n```\n\nIf you want to use Linux pipelines, you can first enter the Docker interactive command line:\n\n```bash\ndocker run --rm -it -v `pwd`:/ssh soulteary/ssh-config:latest bash\ncat /ssh/test.yaml | ssh-config -to-yaml\n```\n\n### Options\n\n- `-to-yaml, -to-json, -to-ssh`: Specify output format (yaml/json/config), only one output format can be specified at a time.\n- `-src`: Specify the original configuration file or directory to read from. When omitted, the tool scans `~/.ssh`.\n- `-dest`: Specify the path to save the configuration file. When omitted, the converted result is written to standard output.\n- `-help`: View program command-line help\n\n### Examples\n\n1. Export the SSH configuration for your current user to YAML (default behaviour):\n\n```bash\nssh-config\n```\n\n2. Convert YAML format to SSH config format:\n\n```bash\nssh-config -to-ssh -src input.yaml -dest output.conf\n```\n\n3. Convert SSH config format to JSON format:\n\n```bash\nssh-config -to-json -src ~/.ssh/config -dest output.json\n```\n\n4. Read from standard input, output to standard output, and save in YAML format:\n\n```bash\ncat input.conf | ssh-config -to-yaml \u003e output.yaml\n```\n\n## Development\n\n### Dependencies\n\n- Go 1.26+\n\n### Build\n\n```bash\ngo build\n```\n\n### Test\n\n```bash\ngo test -v ./... -covermode=atomic -coverprofile=coverage.out \u0026\u0026 go tool cover -html=coverage.out -o coverage.html\n```\n\n## Contributing\n\nIssues and pull requests are welcome.\n\n## License\n\nThis project is licensed under the Apache License. See the [LICENSE](./LICENSE) file for details.\n\n# Guide\n\n- [SSH Config Tool: Use structured data to manage SSH configuration](https://soulteary.com/2024/10/15/manage-ssh-configuration-using-structure-data-ssh-config-tool.html)\n\n# Credits\n\n- Useful OpenSSH software\n  - https://man.openbsd.org/ssh_config\n- Inspiration for the definition of configuration files\n  - https://github.com/bencromwell/sshush\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fssh-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoulteary%2Fssh-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fssh-config/lists"}