I am curious, does SSH compress its data before sending/receiving it? If it does not by default, then can it be turned on?
No and yes. Kind of. Which is to say, it supports compression (zlib or zlib-ish, as I recall), but a stock copy of OpenSSH does not have it enabled by default, though some distributions may enable it by default (I don't think Ubuntu does).
Note that there's also a
You can also turn compression on on a per-session basis by using the command line option
Note that compression can actually have a slightly negative performance impact if the connection between you and the server is fast (e.g. on the same LAN or just on really good internet connections) or one or both sides has a slow CPU (compression eats a fair bit of CPU time).
These days, for most people, I'd suggest using it only as needed. Typically for links of less than 5-10mbps and only when passing a lot of bulk data (transfers of not-already-compressed files, X11 or VNC forwarding, things like that).
You can turn on gzip compression on any SSH. Put
From the ssh man page (type
So just change: