question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generic Terminal Server Device Type

See original GitHub issue

FYI, I have created a ‘terminal_server’ device_type. The general idea is that it won’t do anything post SSH connection (or won’t do much anyways).

Consequently, post SSH connection, you can then do:

>>> net_connect.write_channel("\r")
>>> net_connect.read_channel()
'\r\npynet-rtr1#'

In other words, you can directly interact with the terminal server to get logged-in to the end network device.

Once you have done this, you can then redispatch the connect (i.e. reset the device_type and class to the proper netmiko class.

>>> from netmiko import redispatch

# Dynamically reset the class back to CiscoIosSSH
>>> redispatch(net_connect, device_type='cisco_ios')
>>> 
>>> net_connect.device_type
'cisco_ios'
>>> net_connect.__class__
<class 'netmiko.cisco.cisco_ios.CiscoIosSSH'>

>>> net_connect.base_prompt
'pynet-rtr1'

I am looking for people that are able to test this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:39 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
jeffdehamcommented, Feb 28, 2017

That worked! Thanks again for your help!

1reaction
briantsaunderscommented, Feb 26, 2017

@ktbyers initial testing of the terminal_server works with an Opengear terminal server. Was able to connect to the Opengear and authenticate. From there entered my credentials to log into the NXOS device and then use redispatch to change device type to cisco_nxos and issue a few commands.

Read more comments on GitHub >

github_iconTop Results From Across the Web

netmiko.terminal_server API documentation
Generic Terminal Server driver SSH. Initialize attributes for establishing connection to ... :param device_type: Class selection based on device type.
Read more >
Terminal Server licensing - Windows - Microsoft Learn
These three license types are displayed in Terminal Server License Manager. In the right pane of the display, notice that the first license ......
Read more >
RDS Server - Sessions service - N-able
Service Type, Generic TCP. Instances on a Device, 3. Supported Systems/Applications, Microsoft Terminal Services. Device Class, Server - Generic, ...
Read more >
RFC 1647 - TN3270 Enhancements - IETF Datatracker
RFC 1647 TN3270 Enhancements July 1994 All of the terminal device-types ... pool that absolutely must be defined to the server is the...
Read more >
What is terminal server? | Definition from TechTarget
Some terminal servers can be shared by hundreds of terminals. The terminals can be PCs, terminals that emulate 3270s, printers, or other devices...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found