chore: update private key setup logic
This commit is contained in:
@@ -46,32 +46,12 @@ write_key() {
|
|||||||
echo " Wrote: $key_path"
|
echo " Wrote: $key_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Add your SSH keys below ---
|
# Derive private key names from the public key files in dot_ssh/
|
||||||
# Format: write_key "filename_in_~/.ssh" "Bitwarden secure note name"
|
CHEZMOI_SOURCE_DIR="{{ .chezmoi.sourceDir }}"
|
||||||
#
|
for pub_file in "$CHEZMOI_SOURCE_DIR/dot_ssh"/*.pub; do
|
||||||
# Example:
|
[ -f "$pub_file" ] || continue
|
||||||
# write_key "stevan@freeborn.cloud" "SSH Key - stevan@freeborn.cloud"
|
key_name=$(basename "$pub_file" .pub)
|
||||||
# write_key "ftp_stevanfreeborn_com" "SSH Key - ftp_stevanfreeborn_com"
|
write_key "$key_name" "SSH Key - $key_name"
|
||||||
# write_key "tangled" "SSH Key - tangled"
|
done
|
||||||
# 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"
|
|
||||||
|
|
||||||
echo "==> SSH key setup complete!"
|
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 ---
|
# Derive private key names from the public key files in dot_ssh/
|
||||||
# Format: Write-Key "filename_in_~/.ssh" "Bitwarden secure note name"
|
$chezmoiSourceDir = "{{ .chezmoi.sourceDir }}"
|
||||||
#
|
Get-ChildItem "$chezmoiSourceDir\dot_ssh\*.pub" | ForEach-Object {
|
||||||
# Example:
|
$keyName = $_.BaseName
|
||||||
# Write-Key "stevan@freeborn.cloud" "SSH Key - stevan@freeborn.cloud"
|
Write-Key $keyName "SSH Key - $keyName"
|
||||||
|
}
|
||||||
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"
|
|
||||||
|
|
||||||
Write-Host "==> SSH key setup complete!" -ForegroundColor Cyan
|
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 +0,0 @@
|
|||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC9mM9XajMxOdK3Oy4L1qk7VCwnmvplKMqyVNd56JwsG sfree@g9
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDEHvnMXdTp6zIOM+uJcmQ/gmyppfSpDLNNX+Rg2gFfZ sfree@g9
|
|
||||||
Reference in New Issue
Block a user