I've an CentOS based server and Ubuntu based desktop pc. I'm connecting to my CentOS using ssh X11 forwarding feature. However, speed over the Internet is pretty slow for certain apps such as VMWare console. How do I speed up OpenSSH X11 forwarding using Linux / UNIX desktop system?
You need to use the following syntax to speed up SSH 11 forwarding:
ssh -X -C -c cipher1,cipher2 user@server.example.comWhere,
- -X : Turn on SSH X11 forwarding
- -C : Requests compression of all data. You can also specifies the compression level to use if compression is enabled using the CompressionLevel option in ssh_config file. The argument must be an integer from 1 (fast) to 9 (slow, best). The default level is 6, which is good for most applications.
- -c : Set ciphers. Blowfish is a fast block cipher; it appears very secure and is much faster than 3des. (see sshd man page for more info).
In this example, connect to the ssh server called www544.nixcraft.net.in using vivek user and start firefox browser:
$ ssh -X -C -c blowfish-cbc,arcfour vivek@www544.nixcraft.net
[www544 ~] $ firefox &
You can avoid typing by editing /etc/ssh/ssh_config file as follows:
Cipher blowfish # default line ##Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc ## see man page for more info on Ciphers Ciphers blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc Compression yes
Save and close the file. You can now simply connect it as follows:
$ ssh -X vivek@www544.nixcraft.net
[www544 ~] $ firefox &
References:
- man pages - ssh, ssh_config, sshd
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop















{ 3 comments… read them below or add one }
Hello vivek, Why OpenBSD logo?
…since OpenSSH came from OpenBSD :)
Just the second
[quote]
-C Requests compression of all data (including stdin, stdout, stderr, and data for forwarded X11 and TCP connections). The compression algorithm is the same
used by gzip(1), and the “level” can be controlled by the CompressionLevel option for protocol version 1. Compression is desirable on modem lines and other
slow connections, but will only slow down things on fast networks. The default value can be set on a host-by-host basis in the configuration files; see the
Compression option.
[/quote]
and this is I mean
[quote]but will only slow down things on fast networks[/quote]
RTFM