'Check if at shell prompt root@ and go into CLI.'

def enter_cli_mode(self):

    delay_factor = self.select_delay_factor(delay_factor=0)
    count = 0
    cur_prompt = u''
    while (count < 50):
        self.write_channel(u'\n')
        time.sleep((0.1 * delay_factor))
        cur_prompt = self.read_channel()
        if re.search(u'root@', cur_prompt):
            self.write_channel(u'cli\n')
            time.sleep((0.3 * delay_factor))
            self.clear_buffer()
            break
        elif ((u'>' in cur_prompt) or (u'#' in cur_prompt)):
            break
        count += 1
