'@param tty: The path of the tty device to use in case C{ui} is L{None}.
@type tty: L{FilePath}
@see: L{SSHCommandClientEndpoint.newConnection}'

def __init__(self, reactor, hostname, port, command, username, keys, password, agentEndpoint, knownHosts, ui, tty=FilePath('/dev/tty')):

    self.reactor = reactor
    self.hostname = hostname
    if (port is not None):
        self.port = port
    self.command = command
    self.username = username
    self.keys = keys
    self.password = password
    self.agentEndpoint = agentEndpoint
    if (knownHosts is None):
        knownHosts = self._knownHosts()
    self.knownHosts = knownHosts
    if (ui is None):
        ui = ConsoleUI(self._opener)
    self.ui = ui
    self.tty = tty
