The setup for my computer.
During the installation of macOS:
- don't sign into iCloud during the finalisation
- create alternate
StevenAdm
account
Once logged in, open System Preferences and:
- create the
Steven
account - turn off fast user switching
Log out, then back in as Steven
, signing into iCloud during the
finalisation.
-
Create an SSH key for the new device:
ssh-keygen -trsa -b4096 -C "$USER@$HOST" -f ~/.ssh/id_rsa ssh-add ~/.ssh/id_rsa
-
Copy the SSH key to the clipboard:
pbcopy < ~/.ssh/id_rsa.pub
Make sure you've export
ed values for BACKBLAZE_USER
and
BACKBLAZE_PASSWORD
, and a MACHINE_TYPE
of either dev
or server
,
as appropriate, and then run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/SteveMarshall/mac-setup/main/setup.sh)"
- From a device with my primary key:
- Import primary key into keyring:
gpg --import <path to pubkey> <path to privkey>
- Add a new (signing/encryption) subkey:
```bash
gpg --edit-key <key-id>
gpg> addkey
gpg>> <select RSA, 4096, expiration, passphrase>
gpg> save
```
- Export the new subkey(s):
```bash
gpg --export --armor <primary-key-id> > public-key.asc
gpg --export-secret-subkeys --armor <subkey-id> > private-subkey-<type>.asc
```
- Transfer the
public-key.asc
andprivate-subkey-*.asc
to the new machine securely - Import the keys on the target device:
gpg --import public-key.asc secret-subkey-*.asc
- Add the new GPG key (contents of
public-key.asc
) on GitHub