Accelerating OpenSSH connections
You’ve probably been in the situation before where you have to connect to a server several times, which means that you most likely have to re-authenticate each time. There are several workarounds to this. You can use ssh-keys, or a socket to bypass it. How? In this round we’ll learn about sockets.
Open up your /etc/ssh/sshd_config and find the line Host *. Right below it, paste the following:
And voila, that should speed up your OpenSSH-connection a bit, not to mention you won’t have to re-authenticate each time. Example?
As you can see from the first try we have to authenticate at least once. When done with that, you SSH to the same server, without the need to authenticate again. Without the sockets-setup you’d have to authenticate twice. Nifty huh?