Skip to content

Instantly share code, notes, and snippets.

@SharkyRawr
Created September 11, 2018 18:24
Show Gist options
  • Save SharkyRawr/788593324209d61f2cda0649f4dbc397 to your computer and use it in GitHub Desktop.
Save SharkyRawr/788593324209d61f2cda0649f4dbc397 to your computer and use it in GitHub Desktop.
#! /bin/bash
# See ssh -Q cipher (on both machines)
CIPHERS="[email protected] aes128-ctr aes192-ctr aes256-ctr [email protected] [email protected]"
# Destination server (data will be piped to /dev/null)
DESTINATION="[email protected]"
for cipher in ${CIPHERS} ; do
for i in 1 2 3 ; do
echo
echo "Cipher: $cipher (try $i)"
dd if=/dev/zero bs=1M count=1024 2>sshbench_stats.txt | pv --size 1G | time -p ssh -c "$cipher" ${DESTINATION} 'cat > /dev/null'
grep -v records sshbench_stats.txt
echo "$cipher `grep -v records sshbench_stats.txt`" >> sshbench_results.txt
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment