Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
bizmyth
2 months agoNew Contributor
SSH Agent Config File Order is Dependent on File Ending With Extra Newline
I was very confused as to why I was seeing inconsistent behavior between changes to my `~/.config/1Password/ssh/agent.toml` file until I realized that it depended on whether or not my configuration ended with an extra "/n" character.
Here is an example of a working config:
[[ssh-keys]]
item = "ssh key 1"
vault = "Employee"
[[ssh-keys]]
item = "ssh key 2"
vault = "Private"
[[ssh-keys]]
item = "ssh key 3"
vault = "Engineering"
The results of the command SSH_AUTH_SOCK=~/.1password/agent.sock ssh-add -l are in the correct order:
```
256 SHA256:*** ssh key 1 (ED25519)
256 SHA256:*** ssh key 2 (ED25519)
256 SHA256:*** ssh key 3 (ED25519)
```
However, with one small change to the file:
[[ssh-keys]]
item = "ssh key 1"
vault = "Employee"
[[ssh-keys]]
item = "ssh key 2"
vault = "Private"
[[ssh-keys]]
item = "ssh key 3"
vault = "Engineering"
The parsing reverts to the default output of the command when there is no config file. I think this may have to do with whatever TOML parser not handling files without an extra "\n" ending on the file well.
May be worth a mention on the docs if this is expected behavior. Confused me for quite a while 😅
Hi bizmyth ,
Thanks for sharing this. This is a bug and we are very thankful you found it! I don't have a timeline for a fix, but keep your eyes open on https://releases.1password.com/
Thanks,
Phil & Team
5 Replies
- 1P_Phil
Moderator
Hi bizmyth ,
Did you happen to get a chance to see if there were errors as floris_1P mentioned above?
Thanks!
Phil
- floris_1P
1Password Team
Thanks for reporting! That sounds like a bug. Could you check if you see an error reported in the SSH agent settings panel? If it's a TOML file parsing error, you should see an error message displayed there.
- bizmythNew Contributor
I looked for this, but I didn't see any reported error in the UI.
Here's what it looks like when I cause an intentional error (so I know it is detecting my changes):
Here's what it looks like with the file without a newline character at the end (No `error` in the dialog):
It shows no error, yet it is still parsing the config file incorrectly.
- 1P_Phil
Moderator
Hi bizmyth ,
Thanks for sharing this. This is a bug and we are very thankful you found it! I don't have a timeline for a fix, but keep your eyes open on https://releases.1password.com/
Thanks,
Phil & Team
- 1P_Phil
Moderator