Background:
- using the latest ax version (ax update says it is fine)
- using Digital Ocean
- I have several ssh private keys for different purposes
Problem
When I try to connect to my fleet instances I receive an error message:
ax ssh <targetinstance>
Received disconnect from xxx.xxx.xxx.xx port 2266:2: Too many authentication failures
Disconnected from xxx.xxx.xxx.xx port 2266
This is usually a clear indication that ssh is trying all my private keys before it reaches the one configured in ~/.axiom/axiom.json. I was able to confirm this by removing all my keys from the ssh-agent, which results in axiom connecting normally.
Workaround
I managed to fix the problem by:
ax ssh --just-generate (to generate ~/.axiom/.sshconfig)
ax ssh --just-generate cache (to prevent ax from overwriting my modified config)
- Modify ~/.axiom/.sshconfig by adding:
IdentitiesOnly yes right below the line that says IdentityFile
- Retry
ax ssh <targetinstance> this time with success
Suggested fix
Since ax is using a specific pubkey anyway, it might make sense to add that IdentitiesOnly yes to .sshconfig by default.
Background:
Problem
When I try to connect to my fleet instances I receive an error message:
This is usually a clear indication that ssh is trying all my private keys before it reaches the one configured in ~/.axiom/axiom.json. I was able to confirm this by removing all my keys from the ssh-agent, which results in axiom connecting normally.
Workaround
I managed to fix the problem by:
ax ssh --just-generate(to generate ~/.axiom/.sshconfig)ax ssh --just-generate cache(to prevent ax from overwriting my modified config)IdentitiesOnly yesright below the line that saysIdentityFileax ssh <targetinstance>this time with successSuggested fix
Since ax is using a specific pubkey anyway, it might make sense to add that
IdentitiesOnly yesto .sshconfig by default.