Guest User

Untitled

a guest
Sep 23rd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. my_ssh_port='[CENSORED]'
  4. my_ssh_user='[CENSORED]'
  5. my_identity_file='/home/[CENSORED]/.ssh/id_rsa'
  6. localhost_ip='127.0.0.1'
  7. black_hole='/dev/null'
  8.  
  9. trap cancel 1 2 3 6
  10.  
  11. cancel()
  12. {
  13. echo
  14. echo
  15. echo "Cancelling..."
  16. exit 1
  17. }
  18.  
  19. # cipher list
  20. for cipher in
  21. 3des-cbc aes128-cbc aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se aes128-ctr aes192-ctr
  22. aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com chacha20-poly1305@openssh.com
  23. do
  24. echo
  25. echo $cipher
  26. # copy command
  27. # port
  28. # SSH option(s)
  29. # my private key
  30. # file to copy from localhost RAM disk
  31. # destination for the file
  32. scp
  33. -P "${my_ssh_port}"
  34. -o Cipher="${cipher}"
  35. -i "${my_identity_file}"
  36. /mnt/tmpfs/NonCompressibleEncryptedFile4GiB
  37. "${my_ssh_user}"@"${localhost_ip}":"${black_hole}"
  38. done
  39.  
  40. 3des-cbc
  41. NonCompressibleEncryptedFile4GiB 100% 3804MB 269.9MB/s 00:14
  42.  
  43. aes128-cbc
  44. NonCompressibleEncryptedFile4GiB 100% 3804MB 260.9MB/s 00:14
  45.  
  46. aes192-cbc
  47. NonCompressibleEncryptedFile4GiB 100% 3804MB 268.0MB/s 00:14
  48.  
  49. aes256-cbc
  50. NonCompressibleEncryptedFile4GiB 100% 3804MB 269.4MB/s 00:14
  51.  
  52. rijndael-cbc@lysator.liu.se
  53. NonCompressibleEncryptedFile4GiB 100% 3804MB 268.7MB/s 00:14
  54.  
  55. aes128-ctr
  56. NonCompressibleEncryptedFile4GiB 100% 3804MB 265.6MB/s 00:14
  57.  
  58. aes192-ctr
  59. NonCompressibleEncryptedFile4GiB 100% 3804MB 265.9MB/s 00:14
  60.  
  61. aes256-ctr
  62. NonCompressibleEncryptedFile4GiB 100% 3804MB 260.6MB/s 00:14
  63.  
  64. aes128-gcm@openssh.com
  65. NonCompressibleEncryptedFile4GiB 100% 3804MB 265.3MB/s 00:14
  66.  
  67. aes256-gcm@openssh.com
  68. NonCompressibleEncryptedFile4GiB 100% 3804MB 270.8MB/s 00:14
  69.  
  70. chacha20-poly1305@openssh.com
  71. NonCompressibleEncryptedFile4GiB 100% 3804MB 272.1MB/s 00:13
  72.  
  73. $ pv < /mnt/tmpfs/NonCompressibleEncryptedFile4GiB > /dev/null
  74. 3,71GiB 0:00:00 [7,24GiB/s] [================================>] 100%
  75.  
  76. fs=/mnt/tmpfs/NonCompressibleEncryptedFile4GiB # source file
  77. fd=/dev/stdout # send to stdout
  78. fn=/dev/null # null device
  79.  
  80. $ dd if=$fs of=$fn
  81. 28398935 bytes (28 MB, 27 MiB) copied, 0.16205 s, 175 MB/s
  82.  
  83. $ scp $fs $fd | dd of=$fn
  84. 28398935 bytes (28 MB, 27 MiB) copied, 0.225373 s, 126 MB/s
Add Comment
Please, Sign In to add comment