Add ssh protocol probe (minimal, no command) #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there, I really like this project and have presented it to colleagues at work as a nice solution to trivially check on status of various machines. I've however found a limitation, that this PR tries to close. We have a lot of machines where the only network visible endpoint is the SSH port (running sshd); we also don't have ICMP activated, this is actively blocked by our firewall. Using the TCP probe is reasonable, but it causes a lot of noise in the sshd logs due to the connection not performing a suitable handshake with the daemon.
This PR provides an implementation to handle connecting to an SSH port, and resolve the handshake correctly, without needing to authenticate. This keeps the sshd logs clean, and means that the probe itself also checks that it's connecting to a working sshd. With TCP it's still possible to connect to an open port, and thus possible not report an issue, even if the listening process is in an unstable state
Note, this PR does not provide a completely new probe that supports SSH interactivity, e.g. running a command on a remote machine. Doing this is generally possible, but I think would need a more significant and careful refactoring of the probe module.
Some details:
ssh://<address>:22
(similar to the TCP probe)ssh2
crate