carlmontanari / scrapli

Fast, flexible, sync/async, Python 3.7+ screen scraping client specifically for network devices
https://carlmontanari.github.io/scrapli/
MIT License
575 stars 59 forks source link

Scrapli is no able to use windows to ssh to device #300

Closed marleydude closed 11 months ago

marleydude commented 11 months ago

I am able to ssh from powershell but when i run scrapli i get the following error.

Please advise

from datetime import datetime

from scrapli.driver.core import IOSXEDriver

my_time = datetime.now().strftime("%H:%M:%S")

command_to_send = input("Please Entet the command you would like to send:")

my_device = { "host": "192.168.240.140", "auth_username": "marley", "auth_password": "dude", "auth_strict_key": False, "port": 22, }

with IOSXEDriver(**my_device) as csr_devnet: result = csr_devnet.send_command(command_to_send)

print(result)

PS C:\Users\marle\Documents\Python> & C:/Users/marle/AppData/Local/Programs/Python/Python312/python.exe c:/Users/marle/Documents/Python/scraplii.py Please Entet the command you would like to send:sho run Traceback (most recent call last): File "c:\Users\marle\Documents\Python\scraplii.py", line 20, in
with IOSXEDriver(my_device) as csr_devnet: ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\marle\AppData\Local\Programs\Python\Python312\Lib\site-packages\scrapli\driver\core\cisco_iosxe\sync_driver.py", line 130, in init super().init( File "C:\Users\marle\AppData\Local\Programs\Python\Python312\Lib\site-packages\scrapli\driver\network\sync_driver.py", line 51, in init super().init( File "C:\Users\marle\AppData\Local\Programs\Python\Python312\Lib\site-packages\scrapli\driver\generic\sync_driver.py", line 50, in init super().init( File "C:\Users\marle\AppData\Local\Programs\Python\Python312\Lib\site-packages\scrapli\driver\base\sync_driver.py", line 15, in init super().init(kwargs) File "C:\Users\marle\AppData\Local\Programs\Python\Python312\Lib\site-packages\scrapli\driver\base\base_driver.py", line 199, in init self.transport = transport_class( ^^^^^^^^^^^^^^^^ File "C:\Users\marle\AppData\Local\Programs\Python\Python312\Lib\site-packages\scrapli\transport\plugins\system\transport.py", line 60, in init raise ScrapliUnsupportedPlatform("system transport is not supported on windows devices") scrapli.exceptions.ScrapliUnsupportedPlatform: system transport is not supported on windows devices PS C:\Users\marle\Documents\Python>

PS C:\Windows\system32> ssh marley@192.168.240.140 Password:

R1#sho ver Cisco IOS XE Software, Version 17.03.05 Cisco IOS Software [Amsterdam], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 17.3.5, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2022 by Cisco Systems, Inc. Compiled Wed 09-Feb-22 10:35 by mcpre

carlmontanari commented 11 months ago
raise ScrapliUnsupportedPlatform("system transport is not supported on windows devices")
scrapli.exceptions.ScrapliUnsupportedPlatform: system transport is not supported on windows devices

also from the readme: Although many parts of scrapli do run on Windows, Windows is not officially supported