Open a connection to the NX-OS switch over SSH.

def _init_ssh(opts):
    '''
    Open a connection to the NX-OS switch over SSH.
    '''
    if opts is None:
        opts = __opts__
    try:
        this_prompt = None
        if 'prompt_regex' in opts['proxy']:
            this_prompt = opts['proxy']['prompt_regex']
        elif 'prompt_name' in opts['proxy']:
            this_prompt = '{0}.*#'.format(opts['proxy']['prompt_name'])
        else:
            log.warning('nxos proxy configuration does not specify a prompt match.')
            this_prompt = '.+#$'

        DEVICE_DETAILS[_worker_name()] = SSHConnection(
            host=opts['proxy']['host'],
            username=opts['proxy']['username'],
            password=opts['proxy']['password'],
            key_accept=opts['proxy'].get('key_accept', False),
            ssh_args=opts['proxy'].get('ssh_args', ''),
            prompt=this_prompt)
        out, err = DEVICE_DETAILS[_worker_name()].sendline('terminal length 0')
        log.info('SSH session establised for process %s', _worker_name())
    except Exception as ex:
        log.error('Unable to connect to %s', opts['proxy']['host'])
        log.error('Please check the following:\n')
        log.error('-- Verify that "feature ssh" is enabled on your NX-OS device: %s', opts['proxy']['host'])
        log.error('-- Exception Generated: %s', ex)
        log.error(ex)
        exit()
    DEVICE_DETAILS['initialized'] = True
    DEVICE_DETAILS['no_save_config'] = opts['proxy'].get('no_save_config', False)