Last active
December 6, 2022 09:14
-
-
Save dlenski/e42a08fa27e97b0dbb0c0024c99a8bc4 to your computer and use it in GitHub Desktop.
Revisions
-
dlenski revised this gist
May 30, 2016 . 1 changed file with 18 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,16 +5,18 @@ # You should set up PublicKey authentication so that you don't have to type your # password for every cipher tested. set -o pipefail ciphers="$@" if [[ -n "$ciphers" ]]; then echo "User-supplied ciphers: $ciphers"; fi if [[ -z "$ciphers" ]]; then ciphers=$(egrep '^\s*Ciphers' /etc/ssh/sshd_config|sed 's/Ciphers//; s/,/ /') if [[ -n "$ciphers" ]]; then echo "/etc/ssh/sshd_config allows these ciphers: $ciphers"; fi fi if [[ -z "$ciphers" ]]; then ciphers=$(echo $(ssh -Q cipher)) if [[ -n "$ciphers" ]]; then echo "ssh -Q cipher reports these ciphers: $ciphers"; fi fi @@ -27,9 +29,20 @@ EOF echo "Default cipher test list: $ciphers" fi echo echo "For each cipher, will transfer 1000 MB of zeros to/from localhost." echo tmp=$(mktemp) for i in $ciphers do echo -n "$i: " dd if=/dev/zero bs=1000000 count=1000 2> /dev/null | ssh -c $i -o Compression=no localhost "(time -p cat) > /dev/null" > $tmp 2>&1 if [[ $? == 0 ]]; then grep real $tmp | awk '{print 1000 / $2" MB/s" }' else echo "failed, for why run: ssh -vc $i localhost" fi done -
dlenski revised this gist
May 29, 2016 . 1 changed file with 19 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,29 +1,35 @@ #!/bin/bash # Based on: http://www.systutorials.com/5450/improving-sshscp-performance-by-choosing-ciphers/#comment-28725 # # You should set up PublicKey authentication so that you don't have to type your # password for every cipher tested. ciphers="$@" if [[ -n "$ciphers" ]]; then echo "User-supplied ciphers: $ciphers"; fi if [[ -z "$ciphers" ]]; then ciphers="$(egrep '^\s*Ciphers' /etc/ssh/sshd_config|sed 's/Ciphers//; s/,/ /')" if [[ -n "$ciphers" ]]; then echo "/etc/ssh/sshd_config allows these ciphers: $ciphers"; fi fi if [[ -z "$ciphers" ]]; then ciphers="$(ssh -Q cipher)" if [[ -n "$ciphers" ]]; then echo "ssh -Q cipher reports these ciphers: $ciphers"; fi fi if [[ -z "$ciphers" ]]; then read -rd '' ciphers <<EOF 3des-cbc aes128-cbc aes128-ctr [email protected] aes192-cbc aes192-ctr aes256-cbc aes256-ctr [email protected] arcfour arcfour128 arcfour256 blowfish-cbc cast128-cbc [email protected] [email protected] EOF echo "Default cipher test list: $ciphers" fi for i in $ciphers do dd if=/dev/zero bs=1000000 count=1000 2> /dev/null | ssh -qc $i -o Compression=no localhost "(time -p cat) > /dev/null" 2>&1 | grep real | awk '{print "'$i': "1000 / $2" MB/s" }' done -
dlenski revised this gist
May 29, 2016 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ #!/bin/bash # Based on: http://www.systutorials.com/5450/improving-sshscp-performance-by-choosing-ciphers/#comment-28725 ciphers="$(egrep '^\s*Ciphers' /etc/ssh/sshd_config|sed 's/Ciphers//; s/,/ /')" if [[ -n "$ciphers" ]]; then @@ -21,7 +22,7 @@ fi for i in $ciphers do dd if=/dev/zero bs=1000000 count=1000 2> /dev/null | ssh -qc $i localhost "(time -p cat) > /dev/null" 2>&1 | grep real | awk '{print "'$i': "1000 / $2" MB/s" }' done -
dlenski revised this gist
May 29, 2016 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,13 +6,16 @@ if [[ -n "$ciphers" ]]; then echo "/etc/ssh/sshd_config allows these ciphers: $ciphers" else ciphers="$(ssh -Q cipher)" if [[ -n "$ciphers" ]]; then echo "ssh -Q cipher reports these ciphers: $ciphers" else read -rd '' ciphers <<EOF 3des-cbc aes128-cbc aes128-ctr [email protected] aes192-cbc aes192-ctr aes256-cbc aes256-ctr [email protected] arcfour arcfour128 arcfour256 blowfish-cbc cast128-cbc [email protected] [email protected] EOF echo "Default cipher test list: $ciphers" fi fi for i in $ciphers -
dlenski revised this gist
May 29, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # Based on: # http://www.systutorials.com/5450/improving-sshscp-performance-by-choosing-ciphers/#comment-28725 ciphers="$(egrep '^\s*Ciphers' /etc/ssh/sshd_config|sed 's/Ciphers//; s/,/ /')" if [[ -n "$ciphers" ]]; then echo "/etc/ssh/sshd_config allows these ciphers: $ciphers" else -
dlenski created this gist
May 29, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ # Based on: # http://www.systutorials.com/5450/improving-sshscp-performance-by-choosing-ciphers/#comment-28725 ciphers="$(egrep '^\s*Ciphers' /etc/ssh/sshd_config|sed 's/Ciphers//; s/,/ /'") if [[ -n "$ciphers" ]]; then echo "/etc/ssh/sshd_config allows these ciphers: $ciphers" else ciphers="$(ssh -Q cipher)" echo "ssh -Q cipher reports these ciphers: $ciphers" else read -rd '' ciphers <<EOF 3des-cbc aes128-cbc aes128-ctr [email protected] aes192-cbc aes192-ctr aes256-cbc aes256-ctr [email protected] arcfour arcfour128 arcfour256 blowfish-cbc cast128-cbc [email protected] [email protected] EOF fi for i in $ciphers do dd if=/dev/zero bs=1000000 count=1000 2> /dev/null | ssh -c $i localhost "(time -p cat) > /dev/null" 2>&1 | grep real | awk '{print "'$i': "1000 / $2" MB/s" }' done