steelbrain / node-ssh

SSH2 with Promises
MIT License
945 stars 94 forks source link

how set debug logs in node-ssh npm #449

Open shripadcapgemini opened 1 year ago

shripadcapgemini commented 1 year ago

Hello Everyone,

I am using the node-ssh npm package (2.0.7 version), but due to some issue, node-ssh does not accept packets sent by an SSH server. Just because of this, my application suddenly crashed. I am not able to debug the packet exchange from the client end. Could you please help me to understand how we can set debug logs to check the exact command or packet exchange status?

steelbrain commented 1 year ago

Hi @shripadcapgemini

Thanks for writing in and apologies for the slow response. You should be able to supply the debug param to connect(). See https://github.com/mscdex/ssh2/#:~:text=%7D%2C%0A%7D-,debug,-%2D%20function%20%2D%20Set