Created
December 1, 2016 15:44
-
-
Save blobaugh/fab9b2baa4a1bfd32bebca3ddc83149b to your computer and use it in GitHub Desktop.
Speedtest ssh connection - bash function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
speedtestssh() { | |
# Verify we have a host to check agains | |
[[ -z "$1" ]] && { | |
echo "You must provide an ssh host" ; | |
return; | |
} | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
echo -e "\n${RED}Press CTRL-C to exit test${NC}\n"; | |
yes | pv | ssh $1 "cat > /dev/null" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment