Optimizing SSH for low speed links
sam at topic.com.au
Thu Aug 8 12:00:13 EST 2002
On Thu, 8 Aug 2002, Barndon Daron wrote:
> I have been asked to help with a project to get SCP (or ftp - I prefer
> ssh if possible) running across a 2400baud radio link [ ... ]
> SSH works across this link but is _VERY_ slow...
As you'd expect. :)
Do you need to optimise latency or throughput? I'll assume throughput,
since you're talking about transferring files.
The first obvious thing is compression. Edit /etc/ssh/ssh_config and
make sure you've specified Compression yes and CompressionLevel 9.
Compression will slow things down if your machines aren't fast enough,
but almost anything would be fast enough to saturate a 2400baud
The next thing is to arrange so that you are establishing one single SSH
connection, and re-using that connection for all of your transfers.
Check out 'fsh', which can re-use SSH connections. Or, use the port
forwarding capability and then pretend that you're connecting locally.
As was already mentioned, rsync may help too, by reducing the number of
bytes sent over the wire. Experiment with the --compare-dest option or
copying an old set of data before rsyncing from the new data. rsync
carries an extra overhead if you're trying to sync data to an empty
Ian McCulloch <ianmcc at lorentz.leidenuniv.nl> wrote:
> I have noticed that initiating an ssh connection on a slow link can take a
> long time, I guess it depends on which authentication method you use
Are you sure it's the link that is affecting the connection
establishment? I have a slow machine at home on a reasonably fast
network, and each time I establish an SSH connection it takes a while to
crank out the session key. Once established, it's quite responsive.
> see exactly what is happening. I don't know what to do to try to optimize
> this however.
I don't believe this can be optimised at all, as it's part of the
protocol. You'd lose the security advantages of SSH if you short-cut the
connection establishment phase.
Sam "Eddie" Couter | mailto:sam at topic.com.au
Internet Engineer | jabber:sam at jabber.topic.com.au
tSA Consulting | http://www.topic.com.au/
OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux/attachments/20020808/dc6e61dd/attachment.bin
More information about the linux