StartShell not Honoring Port Setting from Device Setup
HammaBamma opened this issue · 7 comments
So I don't use default port 22 for my SSH connections. Let's say I use 47332 (total example)..
The Script I run will connect to the router fine, but when I try and run StartShell(dev)
paramiko.ssh_exception.NoValidConnectionsError: [Errno None] Unable to connect to port 22 on
and my Router's Ipv4 and IPv6 address are listed..
Every other function I throw at this amazing Python Package works great, but I now need to get a little more information from the box so I want to run a show command and just parse that data on my own. Not sure if anyone else has seen this isssue.
Thanks in Advance.
-Con
Hi @HammaBamma
Thanks,
Simillar issue was reported earlier , fix has been merged .
Could you please re-check your use case with latest PyEZ dev or the fix provided below and share the results.
#1241
Thanks
Hi @HammaBamma
Thanks,
Could you please try with following script and let me know the fix works or not
from jnpr.junos import Device
from jnpr.junos.utils.start_shell import StartShell
host_ip = "10.52.133.204"
port = "8011"
username = "xyz"
password = "xyz"
dev = Device(host=host_ip, port=port, user=username, password=password)
dev.open()
print(dev.facts)
ss = StartShell(dev)
ss.open()
ss.run('cli -c "ping 10.52.135.127 count 5 rapid”')
Thanks
Hi @HammaBamma
Thanks,
Please install the master code and verify the fix .
To install the latest MASTER code
pip install git+https://github.com/Juniper/py-junos-eznc.git
Thanks
Hi @HammaBamma
Thanks for the verification ,
Fix is available in master and will be in next PyEZ release .
Thanks