Forum Discussion
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 😅