為什麽Firefox在SSH上這麽慢?
阿新 • • 發佈:2018-07-30
lec 正在 ack fas 方法 ddr chan tle -h
為什麽Firefox在SSH上這麽慢?
Modified on: Fri, 13 Jul 2018 18:37:30 +0800我嘗試使用
通過SSH啟動Firefox
ssh -X user@hostname
然後
firefox -no-remote
但它非常慢。
我該如何解決這個問題?這是連接問題嗎?
作者:TRiG,DevOps85最佳答案
默認的ssh設置會導致連接速度很慢。請嘗試以下方法:
ssh -YC4c arcfour,blowfish-cbc user@hostname firefox -no-remote
使用的選項是:
-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls. -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 pro‐ tocol 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. -4 Forces ssh to use IPv4 addresses only. -c cipher_spec Selects the cipher specification for encrypting the session. For protocol version 2, cipher_spec is a comma-separated list of ciphers listed in order of preference. See the Ciphers keyword in ssh_config(5) for more information.
這裏的要點是使用不同的加密密碼,在這種情況下,arcfour比默認值更快,並壓縮正在傳輸的數據。
註意:我離這位專家非常非常遠。上面的命令是我在某個博客文章中找到它後使用的,我註意到速度的巨大提升。我相信下面的各個評論者都知道他們在談論什麽,而且這些加密密碼可能不是最好的。這個答案唯一真正相關的部分很可能是使用-C
開關來壓縮正在傳輸的數據。
為什麽Firefox在SSH上這麽慢?