Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paramiko.ssh_exception.SSHException: Error Reading SSH Protocol Banner. #2189

Open
emilduerme opened this issue Nov 12, 2022 · 1 comment
Open

Comments

@emilduerme
Copy link

emilduerme commented Nov 12, 2022

Can anyone help.?

I keep getting Error: Paramiko.ssh_exception.SSHException: Error Reading SSH Protocol Banner.
when i try to disable the SSH on cisco switch. the SSHException is not working..
cisco version: Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(2)E6, R
netmiko
VERSION
4.1.2
paramiko
VERSION
2.12.0

my python file script:

from netmiko import ConnectHandler
from netmiko.exceptions import NetMikoTimeoutException
from paramiko.ssh_exception import SSHException
from paramiko.ssh_exception import AuthenticationException

IP_LIST = open('15_devices.txt')
for IP in IP_LIST:
print ('\n'+ IP.strip() + ' \n' )
RTR = {
'ip': IP,
'username': 'cisco',
'password': 'cisco123',
'device_type': 'cisco_ios',
'secret': 'cisco123',
}

try:
    net_connect = ConnectHandler(**RTR)
except NetMikoTimeoutException:
    print ('Device not reachable.')
    continue
except AuthenticationException:
    print ('Authentication Failure.')
    continue
except SSHException:
    print ('Make sure SSH is enabled in device.')
    continue

output = net_connect.send_command('show ip int brief')
print(output)
@emilduerme emilduerme changed the title Netmiko Paramiko.ssh_exception.SSHException: Error Reading SSH Protocol Banner. Nov 12, 2022
@rosiel
Copy link
Member

rosiel commented Nov 23, 2022

I think you might have posted this in the wrong issue queue. Can you double-check where you intended to post this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants