Skip to content

Instantly share code, notes, and snippets.

@blobaugh
Created December 1, 2016 15:44
Show Gist options
  • Save blobaugh/fab9b2baa4a1bfd32bebca3ddc83149b to your computer and use it in GitHub Desktop.
Save blobaugh/fab9b2baa4a1bfd32bebca3ddc83149b to your computer and use it in GitHub Desktop.
Speedtest ssh connection - bash function
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