code: func NewExecRequest(ctx *ServerContext, command string) (Exec, error) {
  	// It doesn't matter what mode the cluster is in, if this is a Teleport node
  	// return a local *localExec.
  	if ctx.srv.Component() == teleport.ComponentNode {
  		return &localExec{
  			Ctx:     ctx,
  			Command: command,
  		}, nil
  	}
  
  	// When in recording mode, return an *remoteExec which will execute the
  	// command on a remote host. This is used by in-memory forwarding nodes.
  	if ctx.ClusterConfig.GetSessionRecording() == services.RecordAtProxy {
  		return &remoteExec{
  			ctx:     ctx,
  			command: command,
  			session: ctx.RemoteSession,
  		}, nil
  	}
  
  	// Otherwise return a *localExec which will execute locally on the server.
  	// used by the regular Teleport nodes.
  	return &localExec{
  		Ctx:     ctx,
  		Command: command,
  	}, nil
  }
docs: // NewExecRequest creates a new local or remote Exec.