Skip to content

Add automated SSH/GPG key generation and management scripts for Windows and Linux/Mac#1

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-ssh-install-bat-file
Draft

Add automated SSH/GPG key generation and management scripts for Windows and Linux/Mac#1
Copilot wants to merge 4 commits intomainfrom
copilot/add-ssh-install-bat-file

Conversation

Copy link

Copilot AI commented Dec 18, 2025

Implements comprehensive SSH and GPG/PGP key generation automation with interactive wizards, multi-key batch generation, and secure backup functionality.

Core Scripts

ssh-install.bat (Windows)

  • Auto-elevates to administrator, installs OpenSSH if missing
  • Interactive wizard: RSA (2048/4096/8192), Ed25519, ECDSA (256/384/521)
  • PowerShell folder browser for backup location selection
  • GPG/PGP 4096-bit RSA key generation with automatic export

ssh-install.sh (Linux/Mac)

  • Equivalent functionality with color-coded output
  • Proper Unix permissions (700 for .ssh, 600 for keys)
  • Native file browser integration where available

Both scripts support generating 1-10 keys per session with configurable types and lengths.

Documentation & Templates

index.html

  • Static webpage with download links, installation guide, and feature documentation
  • Ionity branding, CC-BY-NC-SA-4.0 license metadata
  • SEO optimized (Open Graph, Twitter Card)

installer/ directory structure

  • SSH config templates with connection examples (bastion hosts, git remotes)
  • authorized_keys and known_hosts templates
  • Configuration file for default settings (installer.conf)

Security Considerations

  • Keys generated without passphrases for automation workflows
  • Explicit warnings when backing up private keys
  • Uses delayed expansion in batch files to prevent injection
  • Proper variable quoting throughout

Example Usage

# Linux/Mac
./ssh-install.sh
# Prompts for email, key count, types, and backup location
# Generates keys to ~/.ssh/id_{type}_{number}

# Windows
ssh-install.bat
# Auto-elevates, same interactive flow
# Generates keys to %USERPROFILE%\.ssh\id_{type}_{number}

Total: 1,899 lines across 12 files (2 scripts, 1 webpage, 9 documentation/template files)

Original prompt

Lets add more to this. Script as bat file that does full SSH install on windows ( after do bash one also)
automated asks password and email once then askes on all as it makes ssh and RSA of choice and how many you want also. has a comment on also.

Makes the total script it auto admins into powershell admin even if ran normally. you can make a Static webpage and a installernthat installs the files needed to connect theres things. static page shows my meta data tagged and Ionity yet is ccbyncsa4.

needsnto be functional. ablento execute files to other location and backup keys to chosen location also not typing needed as explorer opens and options are set for all key types even and lenghts. also gpg anf pgo additions


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 18, 2025 09:40
…ture

Co-authored-by: AntwerpDesignsIonity <211600625+AntwerpDesignsIonity@users.noreply.github.com>
…, and code readability

Co-authored-by: AntwerpDesignsIonity <211600625+AntwerpDesignsIonity@users.noreply.github.com>
Co-authored-by: AntwerpDesignsIonity <211600625+AntwerpDesignsIonity@users.noreply.github.com>
Copilot AI changed the title [WIP] Add bat file for full SSH install on Windows Add automated SSH/GPG key generation and management scripts for Windows and Linux/Mac Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants