Closed damienbutt closed 4 years ago
@damienbutt You are using the wrong device_type...you need to switch over to:
device_type: "cisco_s300"
I would try that and see what happens.
Amazing! That did it. Thanks.
Sorry if this is a Noob question, but what defines the device type then? Is there any way to get this dynamically so I don't need to know it?
@damienbutt There is an SSH autodetect mechanism in Netmiko and an SNMP autodetect mechanism as well. Support for these (as far as Netmiko platforms is somewhat limited, however). I would just look at the ssh_dispatcher.py and find the device_type that most closely matched your platform.
Or in your code, you can put in an invalid device_type and Netmiko will show you all of the options.
just had the same issue and changing the device_type to cisco_s300 worked for me as well, but I also had to add 'ip ssh password-auth' to the switch config for the authentication to actually go through. Just leaving this here in case it helps someone else.
Yep, the ip ssh password-auth
is required on the s300/s350 devices to get them to behave normal from an SSH auth perspective.
Seems that SSHDetect
doesn't support cisco_s300
@gaby Did you check if it is supported by ssh_autodetect? If not, someone would need to add that support.
@ktbyers That's exactly the issue, it's missing from the dict. I'd try making a PR for this during the weekend.
Been trying to use netmiko to write a script for a Cisco SG350-10 and not having much luck. All the videos on YouTube made it look so simple haha.
This outputs:
It seems to find the prompt fairly quickly, although it has some extra chars at the start. Then it hangs for a long time before the exception is thrown. I think it's something to do with those extra chars in the prompt perhaps. They shouldn't be there.
I've also tried using the send_config_set method and that also throws exceptions.
However, if I use the send_command method and specify the "expect_string" parameter as follows:
That works and outputs:
Ideally, I need to use the send_config_set method as I have a bunch of commands to send.
Any ideas what the problem could be?
Thanks in advance.
Damien