From 2096bf9c4194fb71c51117826a06ae5653d1ec63 Mon Sep 17 00:00:00 2001 From: Henning Glawe Date: Sat, 1 May 2021 14:45:16 +0200 Subject: [PATCH] use ssh compression and a ssh-cipher that enables AES-NI If the transfer rate is limited by - network-bandwidth, enable SSH stream compression - ssh/sshd cpu load, switch the ssh-cipher to a one that utilizes hardware-accelerated crypto (like x86-aes-ni) --- bscp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bscp b/bscp index 0227e44..cff99c3 100755 --- a/bscp +++ b/bscp @@ -118,7 +118,7 @@ def bscp(local_filename, remote_host, remote_filename, blocksize, hashname): blockcount = int((size + blocksize - 1) / blocksize) remote_command = 'python -c "%s"' % (remote_script,) - command = ('ssh', '--', remote_host, remote_command) + command = ('ssh', '-C', '-c', 'aes128-gcm@openssh.com', '--', remote_host, remote_command) p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) io = IOCounter(p.stdout, p.stdin)