Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
#! /bin/bash
pgrep sshd >/dev/null || (echo "Please make sure SSH is running _locally_." && exit 1)
testfile=$(mktemp -p /run/user/$UID)
filename=$(basename $testfile)
echo "Generating temporary file, $sz MiB size. Supply a size argument to change. (Should be small enough to fit in RAM twice.)"
dd if=/dev/urandom of=$testfile bs=1048576 count=$sz
for cipher in 3des-cbc aes128-cbc aes128-ctr arcfour arcfour128 blowfish-cbc cast128-cbc; do
echo ""
echo "Cipher $cipher, without compression:"
scp -c $cipher $testfile localhost:/run/user/$UID/out-$filename
rm /run/user/$UID/out-$filename &>/dev/null
echo "Final test, compressed aes128-ctr:"
scp -C -c aes128-ctr $testfile localhost:/run/user/$UID/out-$filename
rm $testfile &>/dev/null
rm /run/user/$UID/out-$filename &>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment