sanketbajoria / ssh2-promise

ssh with promise/async await and typescript support
https://www.npmjs.com/package/ssh2-promise
MIT License
148 stars 24 forks source link

Connection Limit ?? #45

Closed waterfallm closed 4 years ago

waterfallm commented 4 years ago

I'm running ssh.exec in a loop firing 35 commands at the same server, i'm assuming ssh2-promise either reuses or disconnects before each ssh.exec call.

Is there some limit in ssh2-promise or the dependencies that limits to either 5 or 10 connections?

sanketbajoria commented 4 years ago

@waterfallm Currently there is no limit. We have to handle it manually.

waterfallm commented 4 years ago

I found the limit my servers had limit specified in the ufw config.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Sanket Bajoria notifications@github.com Sent: Wednesday, February 5, 2020 12:58:50 PM To: sanketbajoria/ssh2-promise ssh2-promise@noreply.github.com Cc: waterfallm matthew@waterfall-family.co.uk; Mention mention@noreply.github.com Subject: Re: [sanketbajoria/ssh2-promise] Connection Limit ?? (#45)

@waterfallmhttps://github.com/waterfallm Currently there is no limit. We have to handle it manually.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sanketbajoria/ssh2-promise/issues/45?email_source=notifications&email_token=ACHRYP6GM4DGVXSZJSR2NYLRBKZYVA5CNFSM4KEYYWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK3KMTA#issuecomment-582395468, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACHRYP2MI4OGYW5NNT6BEVTRBKZYVANCNFSM4KEYYWMQ.

waterfallm commented 4 years ago

Yes the ufw config'd FW was limiting the connection attempts to 5 in 30 secs. Decided to work within those constraints and improve application logic.