'Initialization of RemoteRunner. Init a session login to remote host or
guest.
:param client: The client to use (\'ssh\', \'telnet\' or \'nc\')
:param host: Hostname or IP address
:param port: Port to connect to
:param username: Username (if required)
:param password: Password (if required)
:param prompt: Shell prompt (regular expression)
:param linesep: The line separator to use when sending lines
(e.g. \'\n\' or \'\r\n\')
:param log_filename: If specified, log all output to this file
:param timeout: Total time duration to wait for a successful login
:param internal_timeout: The maximal time duration (in seconds) to wait
for each step of the login procedure (e.g. the "Are you sure"
prompt or the password prompt)
:param session: An existing session
:see: wait_for_login()
:raise: Whatever wait_for_login() raises'

def __init__(self, client='ssh', host=None, port='22', username='root', password=None, prompt='[\\#\\$]\\s*$', linesep='\n', log_filename=None, timeout=240, internal_timeout=10, session=None):

    if (session is None):
        if (host is None):
            raise error.TestError('Neither    host,    nor    session    was    defined!')
        self.session = wait_for_login(client, host, port, username, password, prompt, linesep, log_filename, timeout, internal_timeout)
    else:
        self.session = session
    self.stdout_pipe = tempfile.mktemp()
    self.stderr_pipe = tempfile.mktemp()
