Closed zydingjun closed 1 year ago
Hi @zydingjun!
Thanks for writing in. For closing the ssh connection, you can just call ssh.dispose()
The timeout is an already supported option, please see readyTimeout
in ssh2 config. You can use it with node-ssh
in .connect()
so it would look like ssh.connect({ ... , readyTimeout: 20000})
Closing this issue as the question has been answered but feel free to continue discussing.
1# add function ssh.close() to close the SSH session; 2# add ConnectTimeout limit for configure;