Archive

Archive for November, 2009

Faster X11 forwarding

November 4th, 2009
Comments Off

Usually, X11 forwarding is slow. However, we can choose some options to make it faster.

1. choose an appropriate cipher specification for encrypting the session

Here is a benchmark done in Ubuntu bug report (#54180)

$ for c in 3des-cbc aes128-cbc aes192-cbc aes256-cbc aes128-ctr aes192-ctr \
aes256-ctr arcfour128 arcfour256 arcfour blowfish-cbc cast128-cbc; \
do echo using cipher $c; ssh -c $c localhost dd if=/dev/zero bs=32k \
count=10000 >/dev/null; done

results:

 3des-cbc	22.6 MB/s
 aes128-cbc	63.8 MB/s
 aes192-cbc	67.6 MB/s
 aes256-cbc	67.4 MB/s
 aes128-ctr	74.9 MB/s
 aes192-ctr	73.6 MB/s
 aes256-ctr	73.3 MB/s
 arcfour128	109 MB/s
 arcfour256	108 MB/s
 arcfour	107 MB/s
 blowfish-cbc	75.0 MB/s
 cast128-cbc	62.0 MB/s

2. choose an appropriate MAC (message authentication code) algorithms

Here is also a benchmark

$ for m in hmac-md5 hmac-sha1 umac-64 hmac-ripemd160; \
do echo using digest $m; ssh -c arcfour128 -m $m localhost \
dd if=/dev/zero bs=32k count=10000 >/dev/null; done

results:

 hmac-md5	108 MB/s
 hmac-sha1	97.9 MB/s
 hmac-ripemd160	83.0 MB/s

3. enable compression

For example, you can establish a much faster connection for X11 forwarding by using

ssh -c arcfour,blowfish-cbc -m hmac-md5 -XC

Linux, computer ,