OS is Debian on both servers.
I found some examples showing how to measure TCP latency with nmap:
nmap --packet-trace -p 22 192.168.0.10
But I'm getting some negative results for latency. ie, it will print some output like:
Host is up (-0.0023s latency)
at the end.
What is nmap doing? Is it measuring the time difference between SYN and SYN-ACK? If so, how is it getting a negative result sometimes? Does it require clocks to be very precisely synced between the two servers?
And in addition, can I use ssh as a good TCP test server or should I use a different service?
Is there another tool I can use to measure TCP latency? I don't know if I trust nmap due to the negative results for the latency measurement.