https://github.com/teguru-labs/ssh-config-generator
SSH Config Generator
https://github.com/teguru-labs/ssh-config-generator
ssh ssh-config
Last synced: 10 months ago
JSON representation
SSH Config Generator
- Host: GitHub
- URL: https://github.com/teguru-labs/ssh-config-generator
- Owner: teguru-labs
- License: mit
- Created: 2023-12-22T05:08:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T09:47:59.000Z (over 1 year ago)
- Last Synced: 2025-03-09T10:25:32.012Z (over 1 year ago)
- Topics: ssh, ssh-config
- Language: Rust
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SSH Config Generator
## Installation
### Binary file
Please download the binary file from [the release page](https://github.com/teguru-labs/ssh-config-generator/releases/latest).
**MacOS:**
```bash
wget https://github.com/teguru-labs/ssh-config-generator/releases/download/v0.1.0/ssh-config_aarch64-apple-darwin -O ssh-config \
&& sudo chmod +x ssh-config \
&& sudo mv ssh-config /usr/local/bin
```
**Linux:**
```bash
wget https://github.com/teguru-labs/ssh-config-generator/releases/download/v0.1.0/ssh-config_x86_64-unknown-linux-gnu -O ssh-config \
&& sudo chmod +x ssh-config \
&& sudo mv ssh-config /usr/local/bin
```
**Verification:**
```bash
ssh-config --version
```
### Build from source
```bash
git clone git@github.com:teguru-labs/ssh-config-generator.git
cargo build --release --bin ssh-config
```
The output file is `./target/release/ssh-config`.
## Usage
```bash
SSH Config Generator
Usage: ssh-config [OPTIONS] --user --host
Options:
-u, --user SSH user
-h, --host SSH hostname
-i, --identity-file Indentity file
-o, --output Output file
--help Print help
-V, --version Print version
```
### Generate SSH Config
```bash
ssh-config -u user -i ~/.ssh/id_rsa -h 127.0.0.1 -h 127.0.0.2
```
Output:
```bash
# generated via `ssh-config` - SSH Config Generator:
Host node1
Hostname 127.0.0.1
User user
Identity file /home/kimyvgy/.ssh/id_rsa
Host node2
Hostname 127.0.0.2
User user
Identity file /home/kimyvgy/.ssh/id_rsa
```