chore: update private key setup logic

This commit is contained in:
Stevan Freeborn
2026-07-07 20:10:47 -05:00
parent fb7c766afa
commit 3589ae7131
4 changed files with 13 additions and 52 deletions
@@ -46,32 +46,12 @@ write_key() {
echo " Wrote: $key_path"
}
# --- Add your SSH keys below ---
# Format: write_key "filename_in_~/.ssh" "Bitwarden secure note name"
#
# Example:
# write_key "stevan@freeborn.cloud" "SSH Key - stevan@freeborn.cloud"
# write_key "ftp_stevanfreeborn_com" "SSH Key - ftp_stevanfreeborn_com"
# write_key "tangled" "SSH Key - tangled"
# write_key "tinker" "SSH Key - tinker"
# write_key "gitea.freeborn.cloud" "SSH Key - gitea.freeborn.cloud"
write_key "bit_bastion.key" "SSH Key - bit_bastion.key"
write_key "stevan@freeborn.cloud" "SSH Key - stevan@freeborn.cloud"
write_key "ftp_stevanfreeborn_com" "SSH Key - ftp_stevanfreeborn_com"
write_key "tangled" "SSH Key - tangled"
write_key "zenbook_tinker" "SSH Key - zenbook_tinker"
write_key "gitea.freeborn.cloud" "SSH Key - gitea.freeborn.cloud"
write_key "id_ed25519" "SSH Key - id_ed25519"
write_key "macbookair" "SSH Key - macbookair"
write_key "macbookpro" "SSH Key - macbookpro"
write_key "truenas" "SSH Key - truenas"
write_key "blog.stevanfreeborn.com_github_actions" "SSH Key - blog.stevanfreeborn.com_github_actions"
write_key "commands_github_actions" "SSH Key - commands_github_actions"
write_key "onspring_qa_playwright_reports_render" "SSH Key - onspring_qa_playwright_reports_render"
write_key "onx_graph_github_actions" "SSH Key - onx_graph_github_actions"
write_key "restapiplayground.stevanfreeborn.com_github_actions" "SSH Key - restapiplayground.stevanfreeborn.com_github_actions"
write_key "steves_bot_github_actions" "SSH Key - steves_bot_github_actions"
# Derive private key names from the public key files in dot_ssh/
CHEZMOI_SOURCE_DIR="{{ .chezmoi.sourceDir }}"
for pub_file in "$CHEZMOI_SOURCE_DIR/dot_ssh"/*.pub; do
[ -f "$pub_file" ] || continue
key_name=$(basename "$pub_file" .pub)
write_key "$key_name" "SSH Key - $key_name"
done
echo "==> SSH key setup complete!"
echo " NOTE: Store your SSH private keys as Bitwarden Secure Notes with the names listed above."
@@ -41,28 +41,11 @@ function Write-Key($name, $bwItemName) {
}
}
# --- Add your SSH keys below ---
# Format: Write-Key "filename_in_~/.ssh" "Bitwarden secure note name"
#
# Example:
# Write-Key "stevan@freeborn.cloud" "SSH Key - stevan@freeborn.cloud"
Write-Key "bit_bastion.key" "SSH Key - bit_bastion.key"
Write-Key "stevan@freeborn.cloud" "SSH Key - stevan@freeborn.cloud"
Write-Key "ftp_stevanfreeborn_com" "SSH Key - ftp_stevanfreeborn_com"
Write-Key "tangled" "SSH Key - tangled"
Write-Key "zenbook_tinker" "SSH Key - zenbook_tinker"
Write-Key "gitea.freeborn.cloud" "SSH Key - gitea.freeborn.cloud"
Write-Key "id_ed25519" "SSH Key - id_ed25519"
Write-Key "macbookair" "SSH Key - macbookair"
Write-Key "macbookpro" "SSH Key - macbookpro"
Write-Key "truenas" "SSH Key - truenas"
Write-Key "blog.stevanfreeborn.com_github_actions" "SSH Key - blog.stevanfreeborn.com_github_actions"
Write-Key "commands_github_actions" "SSH Key - commands_github_actions"
Write-Key "onspring_qa_playwright_reports_render" "SSH Key - onspring_qa_playwright_reports_render"
Write-Key "onx_graph_github_actions" "SSH Key - onx_graph_github_actions"
Write-Key "restapiplayground.stevanfreeborn.com_github_actions" "SSH Key - restapiplayground.stevanfreeborn.com_github_actions"
Write-Key "steves_bot_github_actions" "SSH Key - steves_bot_github_actions"
# Derive private key names from the public key files in dot_ssh/
$chezmoiSourceDir = "{{ .chezmoi.sourceDir }}"
Get-ChildItem "$chezmoiSourceDir\dot_ssh\*.pub" | ForEach-Object {
$keyName = $_.BaseName
Write-Key $keyName "SSH Key - $keyName"
}
Write-Host "==> SSH key setup complete!" -ForegroundColor Cyan
Write-Host " NOTE: Store your SSH private keys as Bitwarden Secure Notes with the names listed above." -ForegroundColor Yellow
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC9mM9XajMxOdK3Oy4L1qk7VCwnmvplKMqyVNd56JwsG sfree@g9
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDEHvnMXdTp6zIOM+uJcmQ/gmyppfSpDLNNX+Rg2gFfZ sfree@g9