sanketbajoria / ssh2-promise

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

How to make 2 exec command in one connection #49

Closed abdrozak20 closed 3 years ago

abdrozak20 commented 4 years ago

I want to exec my command paralel

this is my code image

and i hope the result like this image

sanketbajoria commented 3 years ago

@abdrozak20 actually if we want to execute anything in parallel... just use

x.then(() => Promise.all(x.exec('cmd 1'), x.exec('cmd 2')))