Hi team,
I found an issue about connection to Juniper switch using these Ciphers: aes128-gcm@openssh.com, aes256-gcm@openssh.com.
Setup
Netmiko version
(Paste verbatim output from pip freeze | grep netmiko between quotes below)
netmiko==4.3.0
Netmiko device_type (if relevant to the issue)
(Paste device_type between quotes below)
juniper_junos
Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
Exception (client): Incompatible ssh server (no acceptable ciphers)
Traceback (most recent call last):
File "/home/marcopalmieri/code/github/ita-jenkins-netw-ent-confbucket-cicd/venv-ita-jenkins-netw-ent-confbucket-cicd/lib/python3.11/site-packages/paramiko/transport.py", line 2194, in run
self._handler_table[ptype](m)
File "/home/marcopalmieri/code/github/ita-jenkins-netw-ent-confbucket-cicd/venv-ita-jenkins-netw-ent-confbucket-cicd/lib/python3.11/site-packages/paramiko/transport.py", line 2314, in _negotiate_keys
self._parse_kex_init(m)
File "/home/marcopalmieri/code/github/ita-jenkins-netw-ent-confbucket-cicd/venv-ita-jenkins-netw-ent-confbucket-cicd/lib/python3.11/site-packages/paramiko/transport.py", line 2603, in _parse_kex_init
raise IncompatiblePeer(
paramiko.ssh_exception.IncompatiblePeer: Incompatible ssh server (no acceptable ciphers)
Relevant Python code
(Please try to essentialize your Python code to the minimum code needed to reproduce the issue)
(Paste the code between the quotes below)
import os
import yaml
import netmiko
devices = [{'host': 'JUNIPER_SWITCH', 'device_type': 'juniper_junos', 'ip': '10.1.0.1', 'username': 'ADMIN', 'password': 'ADMIN'}]
def backup_junos(net_device):
"""function to get Junos running-config"""
for n in range(2):
try:
net_connect = netmiko.ConnectHandler(**net_device)
# print("Working on " + net_device['host'])
filename = net_device["host"] + ".conf"
showrun = net_connect.send_command("show configuration | display set")
conf_to_file(filename, showrun)
output = net_device["host"] + ": OK"
print(output)
except Exception:
output = (
net_device["host"]
+ ": ERROR [Authentication failed or device unreachable]"
)
print(output)
continue
else:
break
for device in devices:
backup_junos(device)
Relevant network device configuration
This is the cipher configuration on the switch
set system services ssh ciphers "aes128-gcm@openssh.com"
set system services ssh ciphers "aes256-gcm@openssh.com"
Description of Issue/Question
Hi team, I found an issue about connection to Juniper switch using these Ciphers: aes128-gcm@openssh.com, aes256-gcm@openssh.com.
Setup
Netmiko version
(Paste verbatim output from
pip freeze | grep netmiko
between quotes below)Netmiko device_type (if relevant to the issue)
(Paste
device_type
between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
Relevant Python code
(Please try to essentialize your Python code to the minimum code needed to reproduce the issue) (Paste the code between the quotes below)
Relevant network device configuration
This is the cipher configuration on the switch