After installing tsh, my ssh and git pull
stopped working. The error message says:
too many authentication failures
Inspecting ssh with -v flag I see that it is trying teleport specific keys first, and there are many of them:
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 8 keys
debug1: Will attempt key: teleport:[email protected] RSA-CERT SHA256: agent
debug1: Will attempt key: teleport:[email protected] RSA SHA256: agent
debug1: Will attempt key: teleport:teleport.example.net:gstg-teleport-group:[email protected] RSA-CERT SHA256: agent
debug1: Will attempt key: teleport:teleport.example.net:gstg-teleport-group:[email protected] RSA SHA256: agent
debug1: Will attempt key: teleport:staging.teleport.example.net:staging.teleport.example.net:[email protected] RSA-CERT SHA256: agent
debug1: Will attempt key: teleport:staging.teleport.example.net:staging.teleport.example.net:[email protected] RSA SHA256: agent
debug1: Will attempt key: teleport:production.teleport.example.net:production.teleport.example.net:[email protected] RSA-CERT SHA256: agent
debug1: Will attempt key: teleport:production.teleport.example.net:production.teleport.example.net:[email protected] RSA SHA256: agent
debug1: Will attempt key: /Users/me/.ssh/id_rsa RSA SHA256:
What would be a good way to fix this?
tsh is adding too many keys to local SSH agent.
ssh-add -D
would remove currently stored keys in the agent.Set TELEPORT_USE_LOCAL_SSH_AGENT to false would mean they won't be added into the agent in the future.