Commit e554bc4
committed
feat: Implement server CLI interface (bssh-server binary) (#131)
Implement the bssh-server binary with comprehensive CLI interface for
managing the SSH server.
Features:
- Main commands: run, gen-config, hash-password, check-config,
gen-host-key, version
- Global CLI arguments: -c/--config, -b/--bind-address, -p/--port,
-k/--host-key, -v/--verbose, -D/--foreground, --pid-file
- Configuration file loading with CLI overrides
- Signal handling for graceful shutdown (SIGTERM, SIGINT)
- Password hashing with bcrypt (cost factor 12)
- SSH host key generation (Ed25519/RSA)
- Configuration validation and checking
- Proper error handling and exit codes
Technical details:
- Uses clap for CLI parsing with derive API
- Integrates with existing ServerFileConfig from issue #130
- Supports both file-based and CLI-based configuration
- Added dependencies: bcrypt 0.16, rand 0.8, ssh-key 0.6
- All clippy checks pass with -D warnings
Resolves #1311 parent 0a42a3e commit e554bc4
4 files changed
Lines changed: 548 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments