code: func New(s *terraform.InstanceState) (*Communicator, error) {
  	connInfo, err := parseConnectionInfo(s)
  	if err != nil {
  		return nil, err
  	}
  
  	config, err := prepareSSHConfig(connInfo)
  	if err != nil {
  		return nil, err
  	}
  
  	// Setup the random number generator once. The seed value is the
  	// time multiplied by the PID. This can overflow the int64 but that
  	// is okay. We multiply by the PID in case we have multiple processes
  	// grabbing this at the same time. This is possible with Terraform and
  	// if we communicate to the same host at the same instance, we could
  	// overwrite the same files. Multiplying by the PID prevents this.
  	randLock.Lock()
  	defer randLock.Unlock()
  	if randShared == nil {
  		randShared = rand.New(rand.NewSource(
  			time.Now().UnixNano() * int64(os.Getpid())))
  	}
  
  	comm := &Communicator{
  		connInfo: connInfo,
  		config:   config,
  	}
  
  	return comm, nil
  }
docs: // New creates a new communicator implementation over SSH.