Re:SSH Multiplexing & other OpenSSH Tricks
by njn on Sunday August 22, 2010 @03:49AM
(#1624368)
I'm curious why you would want multiple connections to the same host in the first place. Why not use a terminal multiplexer?
[ Parent
| on HN ]
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).
Re:SSH Multiplexing & other OpenSSH Tricks
by danohuiginn on Sunday August 22, 2010 @05:24AM
(#1624427)
it's convenient if you want to pipe the output of a command on a remote machine into another command on a local machine
ssh server remotecommand | localcommand
Re:SSH Multiplexing & other OpenSSH Tricks
by danohuiginn on Sunday August 22, 2010 @05:48AM
(#1624451)
And some reasons why you might want to do that:
* set up a machine with all packages installed on some (debian/ubuntu) server: ssh server dpkg --get-selections| cut -f1 | xargs sudo apt-get install
* compare output of commands on two machines diff <(command) <(ssh server command)
* test/configure software on a local machine, plugging in its input from the roduction machine where it will be installed once ready
* avoid installing software on the server entirely; pull in the remote output and wrangle it locally (obv. not so good for high volumes)
* think a bug can be fixed by upgrading some software? try it on a test machine, pipe in the required input, and see