Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:ssh [2013/11/17 22:26] Nicopublic:ssh [2023/06/21 22:30] (current) – fix code tag bug Nico
Line 46: Line 46:
   * install some proxy software (i.e., Squid)    * install some proxy software (i.e., Squid) 
   * connect to the server, and map a port to the proxy's one:   * connect to the server, and map a port to the proxy's one:
 +
 +
 <code> <code>
 ssh -R8181:localhost:3128 server_to_connect_to ssh -R8181:localhost:3128 server_to_connect_to
 </code> </code>
   * once connected, enter:   * once connected, enter:
 +
 <code> <code>
 export http_proxy=http://127.0.0.1:8181 export http_proxy=http://127.0.0.1:8181
Line 74: Line 77:
 " | 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]]).