Open NetworkSurfer opened 1 year ago
@GV03 Yeah, this isn't going to work:
guesser = jump_server_channel.write_channel(SSHDetect(**device))
The behavior of that is that SSHDetect(**device)
will execute first. It will try to connect directly from the local machine that the script is executing on`.
So in your above code, you aren't really using the SSH proxy.
I have an article on Netmiko and SSH Proxy here (though you might have some issues with it as you are using Windows):
https://pynet.twb-tech.com/blog/netmiko-ssh-proxy-support.html
I have a list of IP addresses (in code only two IPs are written) and trying to figure out the device_type based on its vendor. have written the below code. we are going through jumphost. this code was just to figure out the device type, plan is to expand it for command execution based on the device vendor. maybe
could not figure out what was wrong and missing in the code and maybe encountered this scenario with Netmiko for the first time, not sure if SSHDetect can work with Jumphost Inbetween. if someone can help and point me in the right direction.
============output as below ================
Jump server prompt: [root@lab-server ~]#
=====now printing the device detail====== Failed to connect to 172.20.20.10 via the jump server: TCP connection to device failed.
Common causes of this problem are:
Device settings: autodetect 172.20.20.10:22
device type of 172.20.20.10 could not be found Failed to connect to 172.20.20.11 via the jump server: TCP connection to device failed.
Common causes of this problem are:
Device settings: autodetect 172.20.20.11:22
device type of 172.20.20.11 could not be found