为什么Firefox在SSH上这么慢?
为什么Firefox在SSH上这么慢?
我尝试使用
通过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
开关来压缩正在传输的数据。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了