Bug Summary
Using Connect to WPE with too many ssh keys in a the ssh-agent prevents Local from establishing a connection to the server.
The Local window will say “Local couldn’t load file list”. The Local log will have lines like:
{"class":"RsyncService","level":"warn","message":"Received disconnect from 35.237.148.8 port 22:2: too many authentication failures\r\nDisconnected from 35.237.148.8 port 22\r\n","thread":"main","timestamp":"2023-12-14T15:45:39.593Z"}
{"class":"RsyncService","level":"warn","message":"rsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(226) [sender=3.1.3]\n","thread":"main","timestamp":"2023-12-14T15:45:39.594Z"}
Note the part about: too many authentication failures
Steps to reproduce
The rough steps are:
- Create a bunch of ssh keys
- Add them to your ssh-agent
- Try and use Local Connect
Details for Mac (but the issue is probably on other systems too):
# create 10 keys and add them to ssh-agent. Just press enter a bunch to use empty passwords for the keys.
for i in {1..10}; do export file="ssh_qa_${i}_id_ed25519"; ssh-keygen -t ed25519 -C "me@qa-ssh.local" -f $file && ssh-add $file; done;
# verify the keys are added to the agent
ssh-add -l
# a bunch of lines like
# 256 SHA256:s0WJ0jyTclj68JzI+ybnUJhHoORlC0VbLcZL5Ft16FY me@qa-ssh.local (ED25519)
# ...
As long as you don’t have other keys with names starting with ssh_qa_
, you can clean up these keys with:
cd ~/.ssh
rm ssh_qa_*