Skip to content

sunqtronaut/ssh-wrappers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH Keygen Wrapper

A simple, automated tool for generating SSH keys from structured YAML input. Designed for anyone who wants to avoid manual key management.

Features

  • YAML-based configuration for multiple keys
  • Automated key generation with proper permissions
  • Option to backup or replace existing keys
  • Field validation and error handling
  • Summary output

Requirements

  • Python 3.x
  • PyYAML (pip install pyyaml)
  • OpenSSH (ssh-keygen in your PATH)

Development

python3 -m venv venv
source venv/bin/activate
pip install pyyaml pre-commit
pre-commit install

Usage

  • Set passphrase with echo -n "passphrase" | base64 and add it to pass_b64 in keys.yml.
python3 -m venv venv
source venv/bin/activate
pip install pyyaml
python ssh_keygen.py keys.yml
  • Use --dry-run to preview actions.
  • Use --replace to backup and overwrite existing keys.
  • Use --key-dir ./ to change directory to store keys (default: ~/.ssh)
  • If you run with both --dry-run and --replace it will act as backup, the script will still perform backups of existing keys before logging the dry-run action. So, even in dry-run mode, the backup step is executed, but no new keys are generated or overwritten - only the backup and logging happen.

TODO

  • Integrate with Bitwarden somehow..

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages