为什么Firefox比SSH这么慢?

DevOps85

我尝试使用以下方式通过SSH启动Firefox

ssh -X user@hostname

接着

firefox -no-remote

但它非常非常慢。

我怎样才能解决这个问题?是连接问题吗?

芒登

默认的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开关来压缩正在传输的数据。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章