Multiplexed SSH sessions for quicker connection
If you need to open multiple SSH connections to the same host, it can get tedious to re-authenticate for every one. And even with public key authentication and no password, the extra channel eats a bit of bandwidth. The solution is multiplexed SSH sessions: Authenticate once, and the following connections to the same host goes over the same session. It's dead easy to set up:
In your ~/.ssh/config file add the following lines. (Make sure that file has user permissions only, i.e. 600).
Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
It takes effect immediately. SSH twice to the same host to verify.