Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
public:ssh [2013/11/17 22:26] Nicopublic:ssh [2013/12/09 02:12] – Multiplexing Nico
Line 74: Line 74:
 " | mail -s "Connexion de $USER sur $HOSTNAME" me@mail.com " | mail -s "Connexion de $USER sur $HOSTNAME" me@mail.com
 </code> </code>
 +
 +====== Multiplexing ======
 +
 +If you make several connections to the same server, you can speed up every connection after the first one by enabling multiplexing.
 +
 +  * create the directory where connections' data will be stored:
 +
 +<code>
 +$ mkdir -p ~/.ssh/connections
 +$ chmod 700 ~/.ssh/connections
 +</code>
 +
 +  * Enable multiplexing for every hosts in .ssh/config:
 +
 +<code>
 +Host *
 +ControlMaster auto
 +ControlPath ~/.ssh/connections/%r_%h_%p
 +</code>
 +
 +Warning: This will not work with tunneled protocols or forwarded ports (See [[http://www.symkat.com/ssh-tips-and-tricks-you-need]]).