Skip to content

Instantly share code, notes, and snippets.

@SharkyRawr
Created September 11, 2018 18:24
Show Gist options
  • Select an option

  • Save SharkyRawr/788593324209d61f2cda0649f4dbc397 to your computer and use it in GitHub Desktop.

Select an option

Save SharkyRawr/788593324209d61f2cda0649f4dbc397 to your computer and use it in GitHub Desktop.
#! /bin/bash
# See ssh -Q cipher (on both machines)
CIPHERS="chacha20-poly1305@openssh.com aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com"
# Destination server (data will be piped to /dev/null)
DESTINATION="sharky@192.168.1.10"
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