2022-12-01 20:30:27 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-12-25 01:09:00 -08:00
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
|
|
{{ includeTemplate "universal/logg" }}
|
2022-12-01 20:35:16 -08:00
|
|
|
|
2022-12-01 20:30:27 -08:00
|
|
|
### Ensure id_rsa is present and create one if it does not exist
|
|
|
|
if [ ! -f "$HOME/.ssh/id_rsa" ]; then
|
|
|
|
logg 'Generating missing default private key / public key (`~/.ssh/id_rsa`)'
|
2022-12-25 01:32:16 -08:00
|
|
|
ssh-keygen -b 4096 -t rsa -f "$HOME/.ssh/id_rsa" -q -N ""
|
2023-03-20 02:32:51 -07:00
|
|
|
chmod 600 "$HOME/.ssh/id_rsa"
|
2022-12-01 20:30:27 -08:00
|
|
|
fi
|