-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Recently we (my colleagues and I) started seeing issues with the agent when starting lots of ssh connections in a small period of time, e.g. when running Ansible on lots of servers. This manifests and authentication errors shown in the Ansible output. We use Pageant on our Windows machines, then ssh-pageant in cygwin. Drilling deeper into this I started ssh-pageant in one shell in debug mode, and set the env variable SSH_AUTH_SOCKET to the path of this agent in another shell. In this other shell I connect to our automation server (with agent forwarding) and from there I ran Ansible. I observed the same issues, but this time I saw that ssh-pageant running in debug mode outputs a lot of errors:
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
ssh-pageant: accept: Too many connections
Searching for this I found this: https://github.com/cuviper/ssh-pageant/blob/master/main.c#L246
But I am not sure what we can do to remedy this situation.
Edit: Just to clarify, even with this debug setup where I am running ssh-pageant in a different shell than where I am actually using the socket from... some connection from Ansible are successful, some are not.