Closed vincentbernat closed 9 months ago
Hey there!
This popped up once before here I believe -- short fix is to use standard transport (go crypto vs subprocess wrapper). Otherwise can probably mess with passing some other ssh flags to see (thinking -t or maybe its -T or two of them... can't recall off the top of my head!) to mess w/ pty things.
Would standard transport be ok fix for now?
Or maybe there is some more reading things for future me to look at when I have some more time :) stuff like this and maybe this
I have tried to enable logging to debug more and discovered that I don't get a password when running the SSH command manually:
00:26 ❱ ssh localhost -p 57401 -o ConnectTimeout=30 -o ServerAliveInterval=30 -l admin -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -F /dev/null
Warning: Permanently added '[localhost]:57401' (ED25519) to the list of known hosts.
Received disconnect from 127.0.0.1 port 57401:2: Too many authentication failures
Disconnected from 127.0.0.1 port 57401
Switching to standard transport works.
can you see if adding -tt
to your ssh command feels better? here is where that was sticking in my head from, wonder if its relevant?
Switching to standard transport works
ok cool. crappy "fix", but better than nothing :)
Received disconnect from 127.0.0.1 port 57401:2: Too many authentication failures
too many auth failures feels bad, does that happen every time? wonder if the ssh server is just upset at something we're doing?
In fact, because of -F /dev/null
, this removes my IdentitiesOnly yes
I am using to workaround problems like this, where some SSH servers do not like to receive too many key attempts. I have 14 keys in my agent. I would suggest to add this option to avoid using the SSH keys inside the agent without an explicit mention?
we always use /dev/null for config unless you tell it not to -- you can pass an explicit config or have it lookup default config file paths with these options! that should sort that out for ya I think ya?
yeah I now as well having too many keys in my agent and got burnt by this as well
Would it be OK to unconditionally add -o IdentitiesOnly=true
before the configuration file?
I don't recall from the top of my head but I'd say more appropriate would be to set this ssh client option when we define the options for the platform
yeah I think hope that these two options here should give ya what you need to tune things to whatever is best for your environment. let us know if that works ok?
I had a brief look at it, and when we use the StandardTransport then you shouldn't have any issues with agent bombing the server with many keys, so this should be all good and also solving your problem with ptx mystique.
think/hope this one is all ok now? will close out but feel free to reopen so we can all re-pow-wow on it if needed!
Hey!
With this simple test program:
And a Docker container with SRLinux running and 57401 mapped to 22. I get:
SSH works fine: