@@ -181,7 +181,7 @@ The `setup-ssh-from-1password.sh` script manages SSH configuration with security
181181#### Default (Safe) Mode
182182
183183``` bash
184- # Download SSH config + public keys only (private keys stay in 1Password)
184+ # Download base SSH config + per-profile fragment + public keys only
185185./setup-ssh-from-1password.sh
186186
187187# Check what's available without downloading
@@ -190,7 +190,8 @@ The `setup-ssh-from-1password.sh` script manages SSH configuration with security
190190
191191In safe mode:
192192
193- - Downloads SSH config from 1Password (stored as Secure Note)
193+ - Downloads base SSH config from 1Password (stored as Secure Note)
194+ - Downloads a per-profile SSH config fragment from 1Password
194195- Downloads ** public keys only** for reference
195196- Private keys remain in 1Password
196197- Uses 1Password SSH Agent for authentication
@@ -252,19 +253,40 @@ This approach:
252253
2532541 . Open 1Password and create new item → SSH Key
2542552 . Name it exactly as expected by the script:
255- - ` github_personal_authentication `
256- - ` github_personal_signing `
257- - ` aws_work_2024_client_1 `
258- - ` github_work_2025_client_1 `
256+ - ` personal_github_authentication `
257+ - ` personal_github_signing `
258+ - ` work_2024_client_1_aws `
259+ - ` work_2025_client_1_github `
260+ - ` work_2025_client_2_github `
261+ - ` work_2025_client_2_ado `
2592623 . Paste your private key
260- 4 . Save to "Private" vault (or adjust ` VAULT ` in script)
263+ 4 . Save to the vault expected by the script for that key
261264
262265#### SSH Config
263266
2642671 . Create new item → Secure Note
265- 2 . Name it: ` SSH Config `
266- 3 . Paste your complete SSH configuration
267- 4 . Save to "Private" vault
268+ 2 . Name it: ` ~/.ssh/config `
269+ 3 . Add your base SSH configuration, for example:
270+
271+ ``` sshconfig
272+ Host *
273+ IdentityAgent "~/.1password/agent.sock"
274+
275+ Include ~/.ssh/config.d/*.conf
276+ ```
277+
278+ 4 . Save it in the vault selected by ` SSH_CONFIG_VAULT ` or ` VAULT `
279+
280+ #### SSH Config Fragments
281+
282+ 1 . Create new item → Secure Note
283+ 2 . Name it as one of:
284+ - ` ~/.ssh/config.d/personal.conf `
285+ - ` ~/.ssh/config.d/work-2024-client-1.conf `
286+ - ` ~/.ssh/config.d/work-2025-client-1.conf `
287+ - ` ~/.ssh/config.d/work-2025-client-2.conf `
288+ 3 . Add only the host stanzas for that profile
289+ 4 . Save it in the same vault as that profile's SSH keys
268290
269291#### Git Config
270292
@@ -275,6 +297,11 @@ This approach:
275297 ``` ini
276298 [url " github-work:OrgName/" ]
277299 insteadOf =
[email protected] :OrgName/
300+ insteadOf = https://github.com/OrgName/
301+
302+ [url " git@ado-work-2025-client-2:v3/ORG/PROJECT/" ]
303+ insteadOf =
[email protected] :v3/ORG/PROJECT/
304+
278305 [user]
279306280307 ```
0 commit comments