Nic*_*ght 56
不,是的。的种类。也就是说,它支持压缩(我记得是 zlib 或 zlib-ish),但是 OpenSSH 的库存副本默认没有启用它,尽管某些发行版可能会默认启用它(我认为 Ubuntu 不会)。
详情请参阅man ssh_config
。您正在寻找Compression
和CompressionLevel
选项,然后您可以在/etc/ssh/ssh_config
.
请注意,Compression
服务器端还有一个选项,用于sshd_config
确定是否允许压缩(默认情况下)。再次,查看man sshd_config
详情。
您还可以使用命令行选项在每个会话的基础上打开压缩-C
。
请注意,如果您和服务器之间的连接速度很快(例如,在同一个 LAN 上或只是在非常好的互联网连接上)或者一方或双方的 CPU 速度较慢(压缩会吃很多东西),那么压缩实际上会对性能产生轻微的负面影响CPU 时间)。
现在,对于大多数人来说,我建议仅在需要时使用它。通常用于小于 5-10mbps 的链接,并且仅在传递大量批量数据时(传输尚未压缩的文件、X11 或 VNC 转发等)。
rjm*_*nro 12
从 ssh 手册页(键入man ssh
以查看整个内容):
-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.
Run Code Online (Sandbox Code Playgroud)
所以只需更改:
ssh hostname
Run Code Online (Sandbox Code Playgroud)
到:
ssh -C hostname
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
66439 次 |
最近记录: |