code: func (c *cmd) createSessionForeign() (string, error) {
  	// Look for a remote node to bind to
  	health := c.apiclient.Health()
  	services, _, err := health.Service("consul", "", true, nil)
  	if err != nil {
  		return "", fmt.Errorf("Failed to find Consul server in remote datacenter: %v", err)
  	}
  	if len(services) == 0 {
  		return "", fmt.Errorf("Failed to find Consul server in remote datacenter")
  	}
  	node := services[0].Node.Node
  	if c.conf.verbose {
  		c.UI.Info(fmt.Sprintf("Binding session to remote node %s@%s", node, c.http.Datacenter()))
  	}
  
  	session := c.apiclient.Session()
  	se := api.SessionEntry{
  		Name:     fmt.Sprintf("Remote Exec via %s@%s", c.conf.localNode, c.conf.localDC),
  		Node:     node,
  		Checks:   []string{},
  		Behavior: api.SessionBehaviorDelete,
  		TTL:      rExecTTL,
  	}
  	id, _, err := session.CreateNoChecks(&se, nil)
  	return id, err
  }
docs: // createSessionLocal is used to create a new session in a foreign datacenter
  // This is more complex since the local agent cannot be used to create
  // a session, and we must associate with a node in the remote datacenter.