Skip to content

Support basic telnet functionality and add CiscoS500 device type#3771

Open
srak289 wants to merge 1 commit intoktbyers:developfrom
srak289:cisco_telnet
Open

Support basic telnet functionality and add CiscoS500 device type#3771
srak289 wants to merge 1 commit intoktbyers:developfrom
srak289:cisco_telnet

Conversation

@srak289
Copy link

@srak289 srak289 commented Feb 8, 2026

Telnet Functionality

I noticed the Telnet connection types lacked implementation and thought this could be a good starting point.

I understand telnet should not be used in production environments but for test environments where you come by a pile of cheap legacy switches that behave poorly with modern SSH kex algorithms and cipher types due to outdates IOS or otherwise .. sometimes telnet is the path of least resistance to getting your lab up and running.

Hope this is something we can continue developing, as I have several other legacy switch types I would like to support.

Cheers.

test results

(netmiko-py3.13) srak@edge:~/netmiko$ py.test tests/unit/                                                                                                                                  
/home/srak/.cache/pypoetry/virtualenvs/netmiko-3kolGDjv-py3.13/lib/python3.13/site-packages/pylama/lint/__init__.py:10: UserWarning: pkg_resources is deprecated as an API. See https://set
uptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.             
  from pkg_resources import iter_entry_points                                                                                                                                              
=================================================================================== test session starts ===================================================================================
platform linux -- Python 3.13.5, pytest-8.3.3, pluggy-1.6.0                                                                                                                                
rootdir: /home/srak/netmiko                                                                                                                                                                
configfile: setup.cfg                                                                                                                                                                      
plugins: pylama-8.4.1, cov-4.1.0                                                                                                                                                           
collected 89 items                                                                                                                                                                         
                                                                                                                                                                                           
tests/unit/test_base_connection.py ................................                                                                                                                 [ 35%] 
tests/unit/test_clitools_helpers.py ..........                                                                                                                                      [ 47%] 
tests/unit/test_clitools_outputters.py ...                                                                                                                                          [ 50%] 
tests/unit/test_connection.py ....                                                                                                                                                  [ 55%] 
tests/unit/test_encryption_hanlding.py ....                                                                                                                                         [ 59%] 
tests/unit/test_entry_points.py .                                                                                                                                                   [ 60%] 
tests/unit/test_ssh_autodetect.py .                                                                                                                                                 [ 61%] 
tests/unit/test_utilities.py ..................................                                                                                                                     [100%]
                                                                                                                                                                                           
=================================================================================== 89 passed in 7.52s ====================================================================================

def __init__(self, **kwargs: Any) -> None:
if "device_type" not in kwargs:
kwargs["device_type"] = "cisco_ios_telnet"
super().__init__(**kwargs)
Copy link
Owner

Choose a reason for hiding this comment

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

You should remove this. This is not needed.

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

Successfully merging this pull request may close these issues.

2 participants