Tool to measure ssh latency ("sshping") ?

Chris Rapier rapier at psc.edu
Fri Jul 28 07:43:03 AEST 2023


Take a look at the metrics option in HPN-SSH. It does not, specifically, 
do a ping but it can get you a lot of information about what is 
happening in the TCP stack if that might help. It might be too 
microlevel for what you are looking to do though. Essentially, it gives 
you a periodic dump of the TCP_INFO struct (in Linux and BSD) on both 
sides of the connection. That doesn't give you latency metrics in and of 
itself though.

The metrics option could probably be extended to get the send/recv times 
of the SSH_MSGs it sends out but, of course, that comes with the 
overhead of processing and I'm not sure how much latency that, in and of 
itself, would add.

Anyway, source code is at https://github.com/rapier/openssh-portable. 
More information at https://psc.edu/hpn-ssh-home including ppas for rpms 
and debs.

Chris


On 7/27/23 5:14 PM, Roland Mainz wrote:
> Hi!
> 
> ----
> 
> Before I start writing one myself...
> ... did anyone ever wrote a tool to measure the latency of a ssh
> connection, a la "ping" ?
> 
> ----
> 
> Bye,
> Roland


More information about the openssh-unix-dev mailing list