code: def connectProcess(connection, processProtocol, commandLine='', env={},
                     usePTY=None, childFDs=None, *args, **kwargs):
      
      processOpenDeferred = defer.Deferred()
      process = SSHProcess(processProtocol, commandLine, env, usePTY, childFDs,
                           *args, **kwargs)
      process.processOpen = processOpenDeferred.callback
      process.openFailed = processOpenDeferred.errback
  
      connection.openChannel(process)
      return processOpenDeferred
docs: Opens a SSHSession channel and connects a ProcessProtocol to it
  
      @param connection: the SSH Connection to open the session channel on
      @param processProtocol: the ProcessProtocol instance to connect to the process
      @param commandLine: the command line to execute the process
      @param env: optional environment variables to set for the process
      @param usePTY: if set, request a PTY for the process
      @param childFDs: custom child file descriptors for the process