-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Using the 7th or higher registered token in Secretive appears to break SSH with "too many authentication failures" #559
Comments
Another test - I just created a key called "M3_Mac" and tried to use it - same behavior. So seems like anything other than a single alphanumeric word (no spaces or special characters) causes the authentication to fail. |
While investigating some more into this, this time on a totally different destination device (desktop, not a Pi-based device), I observed the following logs from the verbose SSH output:
This line stood out to me: It's not clear why this is happening, however. What's even stranger is the keys that I created nearly 1.5 months ago work just fine on almost any device I put them on - it seems to be only new(er) keys that are failing? For instance:
|
Hi @maxgoedjen , curious as to your thoughts on this one? |
Bump |
Are you experiencing this as well? |
I ran into the same problem as well today. I don't think the "problem" is with the secure enclave but instead with the remote ssh server forcing a disconnect after 6 tries. See this stackoverflow question and the line from the above log:
I have not yet had the time to figure out a workaround. |
Workaround with a bit of configuration per host:
|
Ty for sharing this. In the stackoverflow link you shared above, one comment states:
So this appears a bit in contradiction to what you've stated - why would the server not try every key until it works? Or more specifically, and importantly, why is every key up to an arbitrary number able to work, but fails specifically on only the 7th iteration? I asked a coworker to reproduce on his machine (Macbook Air), and he gets the same behavior. So, it is certainly reproducible. Of course, one option could be to use a single, secure enclaved-backed keypair and secure it using TouchID, then share that with each endpoint, with the assumption that no one will break into your MacBook and bypass touchID/strong password, but that's assuming a lot, I think. |
I did a bit further testing, and confirmed that specifying the specific identity file per entry defined in the ~/.ssh/config file appears to work. I also confirmed that the default # of Auth tries on the ssh server located in /etc/ssh/sshd_config defaults to 6, which explains why the 7th secret was failing. I increased this number to 20 and reproduce the same initially-reported behavior:
So it indeed seems like it's more a core SSH behavior than it is tied to Secretive itself. |
Hi,
I've been using Secretive since Day 1 of my recent M3 Pro purchase and I absolutely cannot stop raving about it to anyone I meet. Seriously, this is a grade-A piece of software (and has motivated me to emulate it for Linux hosts using a TPM....).
I believe there is a bug, however, in secrets that contain a number OR space in them. For example, I have secrets called "Pi 5", "Pi 4", etc. that, when I copy over to my devices (Pi 5 and Pi 4, respectively) and attempt to SSH into using Secretive, I am continuously met with the "too many authentication failures" error message.
Here is what my ~/.ssh/config file looks like:
And the output from the command, showing the various keys I have created using Secretive (note the 123123 and "spaces in the name" keys:)
If I connect to my Pi5 using username password at first, copy over the public key associated with the Pi5 key and then try to SSH in from a separate terminal window, this error appears:
If I do the exact same thing but with any of the other keys, i.e.
dev
,prod
, etc. the connection is fine! Notably, all other connections have been working flawlessly (dev, prod, desk, etc.) since I first installed Secretive. It was only after introducing these new filenames (spaces and/or numbers) that I've seen these failures.Brief troubleshooting steps taken:
ssh -i
command and specifying the full path to the secret works, which is interesting...I'm happy to share more logs, or continue testing. I have access to....probably 15 different machines running Linux (or some variant thereof) that I'm happy to test this theory against. If there's something I'm fundamentally misunderstanding about how to use my configuration file (which I think might be the case?), I'd appreciate getting pointed in the right direction. Thanks!
Device: M3 Pro on Sonoma 14.5
Secretive Version 2.4.1 (1.7648958148)
The text was updated successfully, but these errors were encountered: