Connect to WPE doesn't work when too many SSH keys exist

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:

  1. Create a bunch of ssh keys
  2. Add them to your ssh-agent
  3. 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_*

A fix is in the works and should be included in a future release of Local!

2 Likes

Hi all - we tracked down the root cause of this bug and have it patched up in our latest release, Local v8.2.1. This is available in Beta now - Local Beta 8.2.1

Expect to see this rolled out to stable (all users) later this week. Thanks for helping us track this down!

3 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.