carlmontanari/scrapli

Scrapli not honouring system ssh config

sngx13 opened this issue · 1 comments

Describe the bug
SSH from system:

ssh developer@sandbox-iosxe-recomm-1.cisco.com

hello, this is banner
from human
Password:

Scrapli script:

./cisco_scrapli.py
No matching key exchange found for host, their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1

To Reproduce
Steps to reproduce the behavior:

  1. Your script
#!/usr/bin/python3
import json
from scrapli import Scrapli

# sandbox-iosxe-recomm-1.cisco.com - 131.226.217.149
# sandbox-iosxe-latest-1.cisco.com - 131.226.217.143

cli_username = 'developer'
cli_password = 'C1sco12345'
platform = 'cisco_iosxe'


device = {
            'host': '131.226.217.149',
            'auth_username': cli_username,
            'auth_password': cli_password,
            'auth_strict_key': False,
            'platform': platform
}
try:
    with Scrapli(**device) as conn:
        interfaces = conn.send_command('show version')
        output = interfaces.textfsm_parse_output()
        print(
            json.dumps(output, indent=4),
        )
except Exception as error:
    print(error)
  1. What you're connecting to (vendor, platform, version) Cisco CSR(1000v) Version 16.9.3

OS (please complete the following information):

  • OS: Debian 11.1
  • scrapli version: 2021.7.30

Additional context
Add any other context about the problem here.

You need to tell scrapli to use the ssh config file. docs