Skip to content

✨ Implement sshctl key generate command #20

@AndreLeclercq

Description

@AndreLeclercq

Goal

Add a command to generate SSH keys interactively.

Command

sshctl key generate <key-name>

Features

  • Interactive prompts for:
    • Key type selection (Ed25519, RSA-4096, RSA-2048, ECDSA)
    • Passphrase (optional)
    • Save path (default: ~/.ssh/)
  • Use ssh-keygen under the hood
  • Clear success message with key location
  • Proper error handling (ssh-keygen not found, key exists, permission denied)

Example Usage

  $ sshctl key generate github-personal
  # Interactive prompts...
  ✓ SSH key pair generated successfully!
    Private key: ~/.ssh/github-personal
    Public key:  ~/.ssh/github-personal.pub

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions