Skip to content

Instantly share code, notes, and snippets.

@rogual
rogual / vcssh
Last active August 20, 2018 13:23 — forked from mheiges/vcssh
wrapper for Vagrant ssh that manages a ControlMaster for instant ssh connections
#!/bin/bash
# ssh to vagrant hosts can be slow due to Ruby overhead of running
# 'vagrant ssh' and ssh overhead to setup the network connection.
#
# This wrapper uses that slow setup routine once to create a reusable ssh
# ControlMaster socket. Subsequent connections invoke the ssh executable
# directly (bypassing Ruby) and connect over the ControlMaster socket
# (bypassing the connection setup) so are almost instantaneous.
#