# SSH ping ![Crates.io Version](https://img.shields.io/crates/v/sshping) ![Crates.io License](https://img.shields.io/crates/l/sshping) ![Crates.io Total Downloads](https://img.shields.io/crates/d/sshping) ![Crates.io Downloads (latest version)](https://img.shields.io/crates/dv/sshping) ![GitHub Repo stars](https://img.shields.io/github/stars/TeddyHuang-00/sshping) 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](https://github.com/spook/sshping) in Rust. ## Installation ### Cargo `sshping` is published on [crates.io](https://crates.io/crates/sshping), you can install it with (first having rust toolchain installed): ```sh cargo install sshping ``` 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: ```sh cargo install sshping -F include-openssl ``` ### Homebrew (macOS/Linux) `sshping` is also available on Homebrew/Linuxbrew, you can install it with: ```sh brew install TeddyHuang-00/app/sshping ``` ### Pre-built binaries Pre-built binaries are available on the [releases page](https://github.com/TeddyHuang-00/sshping/releases). 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: ```sh git clone git@github.com:TeddyHuang-00/sshping.git # Or git clone https://github.com/TeddyHuang-00/sshping.git # Then cd sshping ``` Then build and install it with cargo: ```sh cargo install --path . ``` As with the `include-openssl` feature, you can also enable it when installing from source: ```sh cargo install --path . -F include-openssl ``` ## Usage ```sh Usage: sshping [OPTIONS] Arguments: [user@]host[:port] Options: -f, --config Read the ssh config file FILE for options [default: ~/.ssh/config] -i, --identity Use identity FILE, i.e., ssh private key file -p, --password Use password PWD for authentication (not recommended) -T, --ssh-timeout Time limit for ssh connection in seconds [default: 10] -r, --run-tests Run TEST [default: both] [possible values: echo, speed, both] -c, --char-count Number of characters to echo [default: 1000] -e, --echo-cmd Use CMD for echo command [default: "cat > /dev/null"] -t, --echo-timeout Time limit for echo test in seconds -s, --size File SIZE for speed test [default: 8.0MB] -u, --chunk-size Chunk SIZE for splitting file in speed test [default: 1.0MB] -z, --remote-file Remote FILE path for speed tests [default: /tmp/sshping-test.tmp] -b, --table-style