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

I am losing my carriage returns #4

Open
b1r63r opened this issue Oct 16, 2021 · 3 comments
Open

I am losing my carriage returns #4

b1r63r opened this issue Oct 16, 2021 · 3 comments

Comments

@b1r63r
Copy link

b1r63r commented Oct 16, 2021

I am using this project to connect from a linux host to a old cisco switch. The gateway is running locally on the linux host under systemd.
The output from the cisco lacks carriage returns on new lines. I only get line feeds. You can't really see in the block below here how the beginning of a line is exactly below the end of the previous line.
Ordinary telnet from the same linux box works ok.
Because of this ansible does not see the privilege escalation prompt.

                                               sw-c01>show version
                                                                  Cisco IOS Software, CBS30X0 Software (CBS30X0-IPBASE-M), Version 15.0(2)SE11, RELEASE SOFTWARE (fc3)
                                                                  Technical Support: http://www.cisco.com/techsupport
                 Copyright (c) 1986-2017 by Cisco Systems, Inc.
                                                               Compiled Sat 19-Aug-17 10:03 by prod_rel_team

@eoprede
Copy link
Owner

eoprede commented Oct 16, 2021

My guess is that something is happening in lines 153-162 of ssh_to_telnet_proxy.py
You can first start by running script with -l debug to see which lines you receive from the switch and which lines you forward to Ansible via SSH. If the issue is there, you can start by doing something very simple like just commenting out lines 158-160, or commenting out all lines 154-161 and changing line 162 to self.chan.send(line)
You can also paste debug here and I can attempt to figure out what's going on there, but it's somewhat hard without having hardware at hand.

@b1r63r
Copy link
Author

b1r63r commented Oct 17, 2021

Thanks for the pointers. I will get back to you once I find time to dig into this.

@HB9VQQ
Copy link

HB9VQQ commented Feb 21, 2023

After commenting out lines 158-160 the output is correct. I just don't see what I am typing. Any hint?

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

3 participants