summaryrefslogtreecommitdiffstats
path: root/speedtest-ssh
blob: 9c63d3ce1eabd9b1b99a5485614f5e0fe0685b23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

host=$1
mode=$2

case "$mode" in
	down)
	ssh -S none "$host" -o Compression=no "cat /dev/zero" | pv >/dev/null
	;;
	up)
	pv </dev/zero | ssh -S none "$host" -o Compression=no "cat >/dev/null"
	;;
*)
	echo "usage: ${0##*/} <host> <up/down>" >&2
	exit 1
	;;
esac