I do wish keepalive could be turned on/off more dynamically - most of the locations I connect from it's a disadvantage so I don't have it configured, and having to edit the config file when I'm in one where it's useful just annoys me.
I suppose I should just write a script that perl -pi -e 's/KeepAlive yes/KeepAlive no/' .ssh/config or similar, but it still seems ... annoying.
It removes the latency if you need to interact with the remote server, for example with remote repositories. I tried some experiments today with Bitbucket, and using connection multiplexing halved the time of most of my common mercurial operations (8s -> 4s).
Is there a way to do the reverse? That is, can I ensure a more stable connection by using one terminal to open multiple SSH TCP connections for faster speed and redundancy?
My workplace sometimes suffers from serious problems and because TCP allocates resources based on number of connections, I'm pretty sure I can improve the situation by establishing 2 tcp connections for the terminal.
TCP was designed to assume that packet loss was due to contention... so if you have random or other non-contention-related packet loss, your sessions will slow to a crawl. In this case multiplexing might make things worse than separate sessions... but you're probably just as screwed either way. What you really need to do is just get them to fix the random packet loss problem you probably have.
+1 just for the multiplex magic, But then, I /would/ say that =)
That TTL thing is handy too, I'm sure I had some understanding of it previously, but reading the article made me check my settings and made me realize my timeouts were ridiculously low so even short disconnections killed my session.
For the proxy thing you may want to configure your applications to proxy DNS requests as well. Some do not do it by default and would leak the hostnames you're connecting to.
In firefox the about:config variable is "network.proxy.socks_remote_dns". Set it to true.
I wish cygwin supported multiplexing. Emacs + TRAMP is noticeably slower for me when I'm running on Windows. Anyone have a good workaround or alternative?
Multiplexing is multiplexing. That is, encoding multiple data streams across one channel. In our case, thats having a singular SSH connection from a to b, but having multiple streams of bidirectional data flowing across that singular connection. https://secure.wikimedia.org/wikipedia/en/wiki/Multiplexing So no, multiplexing is started on the client side, and then it happens on server side too. There has to be a multiplex ( many to 1 ) and demultiplex ( 1 to many ) in order for "multiplexing" to occur.
I suppose I should just write a script that perl -pi -e 's/KeepAlive yes/KeepAlive no/' .ssh/config or similar, but it still seems ... annoying.