ssh2
ssh2 copied to clipboard
How to correctly end client connection / block client ?
Say the client fails to log in 3 times in a row and I want to block his IP. What's the correct way to do this and send the client a message that he did too many login attempts?
I tried calling client.end()
in the connection
event. It ends the connection but I also get Error: Bad identification start
after that.
Nothing like that is exposed currently.
Nothing like that is exposed currently.
hostVerifier - function - Function with parameters (hashedKey[, callback]) where hashedKey is a string hex hash of the host's key for verification purposes. Return true to continue with the handshake or false to reject and disconnect, or call callback() with true or false if you need to perform asynchronous verification. Default: (auto-accept if hostVerifier is not set) I see this function can use callback. Where can I see some examples , I don't konw how to use it.