Skip to content

Instantly share code, notes, and snippets.

@Waester
Created July 22, 2021 10:19
Show Gist options
  • Save Waester/e24aaafb63bb8ad43b8d6ee0d297b67e to your computer and use it in GitHub Desktop.
Save Waester/e24aaafb63bb8ad43b8d6ee0d297b67e to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://turecki.net/content/getting-most-out-ssh-hardware-acceleration-tuning-aes-ni
# Usage: cipherbench.sh <hostname>
size=1000
for i in $(ssh -Q cipher); do
dd if=/dev/zero bs=1MB count=$size 2> /dev/null | \
ssh -c $i $1 "(time -p cat) > /dev/null" 2>&1 | \
grep real | \
awk '{print "'$i': "'$size' / $2" MB/s" }'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment