You know the feeling when you rebooted a machine, and you keep retrying to connect over SSH, just to get a connection error? Or you keep pinging the machine until it’s up?

There’s an easier way!

Edit or create ~/.ssh/config

And add this line:

ConnectionAttempts 120

Now SSH will retry connecting every second for two minutes, enough time for the host to reboot!