SSH ping
SSH-based ping that measures interactive character echo latency and file transfer throughput. Pronounced "shipping".
A continuation and re-work of the original ssh-ping in Rust.
Installation
Cargo
sshping
is published on crates.io, you can install it with (first having rust toolchain installed):
You can also opt in to the include-openssl
feature to bundle OpenSSL with the binary, for rare cases where the system OpenSSL is not available:
Pre-built binaries
Pre-built binaries are available on the releases page. You can download the binary for your platform and put it in your $PATH
.
Note that all pre-built binaries are built with the include-openssl
feature enabled, so they are self-contained and do not require OpenSSL to be installed on the system.
From source
To install from source, you can clone the repository first:
# Or
# Then
Then build and install it with cargo:
As with the include-openssl
feature, you can also enable it when installing from source:
Usage
<TARGET> [user@]host[:port]
)
)
)
Examples
Ping a host from ssh config with human-readable output and modern table style with rounded corners:
Ping a certain host with username and port, using _
as delimiter and a specific identity file:
| | | |
| | | |
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
| | | |
|
| | | |
Contributing
Contributions are welcome! Feel free to open an issue or a pull request. Anything from bug report to feature request to code contribution is appreciated.
Currently, there are a few things that can be added but haven't been yet. If you would like to help but don't know where to start, you can check this list below:
- Table style customization
- Unit test
- Man page generation
- Shell autocompletion script generation
- Packaging for various platforms
- More SSH tests
- Better error handling
- Code optimization
FAQ
How to use public-private key pair for authentication?
Using public-private key pair is recommended, you can either provide the identity file (private key) path through -i
argument or use agent authentication by adding the identity file to your ssh agent:
# Start SSH agent if you haven't already
# Add identity to agent (assuming it is `~/.ssh/id_rsa`)
Why isn't XXX functionality of SSH supported?
Many features like ProxyJump
and BindAddress
are currently not supported due to the limitation of upstream libraries.
If they got implemented in the upstream libraries, they will be added to this project as well. Or you can open a pull request to add them yourself!
Why isn't all my identity file in SSH config being used?
If more than one identity file is given in the configuration file, only the first one will be used. This is an opinionated design choice to keep the implementation simple.