Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Unable to use jnpr.junos device library to open a device conection

$
0
0

Hi I getting this type of errors,

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jnpr/junos/device.py", line 1374, in open    self._conn = netconf_ssh.connect(                 ^^^^^^^^^^^^^^^^^^^^  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ncclient/manager.py", line 187, in connect    return connect_ssh(*args, **kwds)           ^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ncclient/manager.py", line 139, in connect_ssh    session.connect(*args, **kwds)  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ncclient/transport/ssh.py", line 288, in connect    raise SSHError("Could not open socket to %s:%s" % (host, port))ncclient.transport.errors.SSHError: Could not open socket to 10.233.146.10:830

My code is really simple anyone with a past experience,

typefrom pprint import pprintfrom jnpr.junos import Devicefrom jnpr.junos.utils.config import Config print("Prueba de conexion a equipo")dev = Device(host='10.233.146.10', user='user', password='password' )dev.open()print ("the router basic information is: ")cu = Config(dev)print (cu)print("closing connection")    dev.close() here

Just to open the netconf connection and close it,


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>