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

Update ruckus_fastiron.py KexAlgorithms & HostKeyAlgorithms #3449

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions netmiko/ruckus/ruckus_fastiron.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
class RuckusFastironBase(CiscoSSHConnection):
"""Ruckus FastIron aka ICX support."""

def _modify_connection_params(self) -> None:
"""Modify connection parameters prior to SSH connection."""
paramiko_transport = getattr(paramiko, "Transport")
paramiko.Transport._preferred_kex.add(
"diffie-hellman-group14-sha1",
"diffie-hellman-group1-sha1",
)
paramiko.Transport._preferred_keys.add(
"ssh-rsa",
)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you retrieve paramiko_transport, but then change and reference paramiko.Transport?

Shouldn't it be:

        paramiko_transport = getattr(paramiko, "Transport")
        paramiko_transport._preferred_kex.add(
            "diffie-hellman-group14-sha1",
            "diffie-hellman-group1-sha1",
        )
        paramiko_transport._preferred_keys.add(
            "ssh-rsa",
        )

def session_preparation(self) -> None:
"""FastIron requires to be enable mode to disable paging."""
self._test_channel_read()
Expand Down
Loading