You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 1046, in establish_connection
self.remote_conn_pre.connect(**ssh_connect_params)
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\client.py", line 459, in connect
self._auth(
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\client.py", line 790, in _auth
raise saved_exception
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\client.py", line 777, in _auth
self._transport.auth_password(username, password)
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\transport.py", line 1569, in auth_password
return self.auth_handler.wait_for_response(my_event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\auth_handler.py", line 259, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\vdawson\OneDrive - Metropolitan Atlanta Rapid Transit Authority\Projects\ISE\AudoDetect.py", line 7, in
guesser = SSHDetect(**remote_device)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\ssh_autodetect.py", line 314, in init
self.connection = ConnectHandler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\ssh_dispatcher.py", line 365, in ConnectHandler
return ConnectionClass(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 439, in init
self._open()
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 444, in _open
self.establish_connection()
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 1083, in establish_connection
raise NetmikoAuthenticationException(msg)
netmiko.exceptions.NetmikoAuthenticationException: Authentication to device failed.
I am trying to use Netmiko to access a StarTech Switch. My issue is that when you SSH into the switch you get a
LOGIN AS: prompt. you can enter anything here
then I get a USERNAME: prompt and a Password Prompt
####My Code
from netmiko.ssh_autodetect import SSHDetect
from netmiko.ssh_dispatcher import ConnectHandler
remote_device = {'device_type': 'autodetect',
'host': 'MyHost',
'username': 'USER1',
'password': 'Password1'}
guesser = SSHDetect(**remote_device)
best_match = guesser.autodetect()
print(best_match)
####Error message:
Traceback (most recent call last):
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 1046, in establish_connection
self.remote_conn_pre.connect(**ssh_connect_params)
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\client.py", line 459, in connect
self._auth(
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\client.py", line 790, in _auth
raise saved_exception
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\client.py", line 777, in _auth
self._transport.auth_password(username, password)
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\transport.py", line 1569, in auth_password
return self.auth_handler.wait_for_response(my_event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\paramiko\auth_handler.py", line 259, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\vdawson\OneDrive - Metropolitan Atlanta Rapid Transit Authority\Projects\ISE\AudoDetect.py", line 7, in
guesser = SSHDetect(**remote_device)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\ssh_autodetect.py", line 314, in init
self.connection = ConnectHandler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\ssh_dispatcher.py", line 365, in ConnectHandler
return ConnectionClass(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 439, in init
self._open()
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 444, in _open
self.establish_connection()
File "C:\Users\vdawson\AppData\Local\Programs\Python\Python311\Lib\site-packages\netmiko\base_connection.py", line 1083, in establish_connection
raise NetmikoAuthenticationException(msg)
netmiko.exceptions.NetmikoAuthenticationException: Authentication to device failed.
Common causes of this problem are:
Device settings: autodetect 10.XXX..XXX.XXX
Authentication failed.
================ READY ================
Please let me know if you need more information
Thanks
The text was updated successfully, but these errors were encountered: