- Notifications
You must be signed in to change notification settings - Fork4
1MB size, 100% Coverage, Use more expressive YAML / JSON to manage your Config files. --- 1MB大小,100% 测试覆盖,使用更具表现力的YAML / JSON来管理您的配置文件。
License
soulteary/ssh-config
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SSH 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.
- Supports conversion from YAML/JSON format to standard SSH config format
- Supports conversion from standard SSH config format to YAML/JSON format
- Supports reading configuration from files or standard input (stdin)
- Supports output to files or standard output (stdout)
- Automatically detects input format (YAML/JSON/SSH Config)
Use Docker or download the binary file suitable for your system and CPU architecture from theGitHub release page.
ssh-config [options]<input_file><output_file>
Or, use Linux pipes to manipulate files:
cat input_file| ssh-config -to-yaml> output_file
Download docker image:
docker pull soulteary/ssh-config:v1.2.0# ordocker pull ghcr.io/soulteary/ssh-config:v1.2.0
Convert file (test.yaml) in the current directory to YAML (abc.yaml):
docker run --rm -it -v`pwd`:/ssh soulteary/ssh-config:v1.2.0 ssh-config -to-yaml -src /ssh/test.yaml -dest /ssh/abc.yaml
Just want to see the conversion results:
docker run --rm -it -v`pwd`:/ssh soulteary/ssh-config:v1.2.0 ssh-config -to-yaml -src /ssh/test.yaml
If you want to use Linux pipelines, you can first enter the Docker interactive command line:
docker run --rm -it -v`pwd`:/ssh soulteary/ssh-config:v1.2.0 bashcat /ssh/test.yaml| ssh-config -to-yaml
-to-yaml, -to-json, -to-ssh
: Specify output format (yaml/json/config), only one output format can be specified at a time.-src
: Specify the original configuration file or directory to read from-dest
: Specify the path to save the configuration file-help
: View program command-line help
- Convert YAML format to SSH config format:
ssh-config -to-ssh -src input.yaml -dest output.conf
- Convert SSH config format to JSON format:
ssh-config -to-json -src~/.ssh/config -dest output.json
- Read from standard input, output to standard output, and save in YAML format:
cat input.conf| ssh-config -to-yaml> output.yaml
- Go 1.23+
go build
gotest -v ./... -covermode=atomic -coverprofile=coverage.out&& go tool cover -html=coverage.out -o coverage.html
Issues and pull requests are welcome.
This project is licensed under the Apache License. See theLICENSE file for details.
- Useful OpenSSH software
- Inspiration for the definition of configuration files
About
1MB size, 100% Coverage, Use more expressive YAML / JSON to manage your Config files. --- 1MB大小,100% 测试覆盖,使用更具表现力的YAML / JSON来管理您的配置文件。
Topics
Resources
License
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.