04-14-2020 09:24 AM
I have no issue SSH manually from Linux client to Cisco Router.
However when I try to connect to the same Router using Python netmiko, the following error occurred.
>>> from netmiko import ConnectHandler >>> R1 = { ... 'device_type': 'cisco_ios', ... 'ip': '10.10.10.10', ... 'username': 'u', ... 'password': 'p' ... } >>> >>> net_connect = ConnectHandler(**R1) Exception: Incompatible version (2.99 instead of 2.0) Traceback (most recent call last): File "/home/user/.local/lib/python3.7/site-packages/paramiko/transport.py", line 2039, in run self._check_banner() File "/home/user/.local/lib/python3.7/site-packages/paramiko/transport.py", line 2240, in _check_banner raise SSHException(msg.format(version)) paramiko.ssh_exception.SSHException: Incompatible version (2.99 instead of 2.0) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/user/.local/lib/python3.7/site-packages/netmiko/ssh_dispatcher.py", line 259, in ConnectHandler return ConnectionClass(*args, **kwargs) File "/home/user/.local/lib/python3.7/site-packages/netmiko/base_connection.py", line 327, in __init__ self._open() File "/home/user/.local/lib/python3.7/site-packages/netmiko/base_connection.py", line 332, in _open self.establish_connection() File "/home/user/.local/lib/python3.7/site-packages/netmiko/base_connection.py", line 901, in establish_connection self.remote_conn_pre.connect(**ssh_connect_params) File "/home/user/.local/lib/python3.7/site-packages/paramiko/client.py", line 406, in connect t.start_client(timeout=timeout) File "/home/user/.local/lib/python3.7/site-packages/paramiko/transport.py", line 660, in start_client raise e File "/home/user/.local/lib/python3.7/site-packages/paramiko/transport.py", line 2039, in run self._check_banner() File "/home/user/.local/lib/python3.7/site-packages/paramiko/transport.py", line 2240, in _check_banner raise SSHException(msg.format(version)) paramiko.ssh_exception.SSHException: Incompatible version (2.99 instead of 2.0) >>>
Reference: https://pypi.org/project/netmiko/
What's wrong with this and how to fix it?
04-14-2020 03:08 PM
Try this on the router to see if it works.
Router(config)#ip ssh version 2
04-14-2020 05:57 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide