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

Running "terminal length 0" in SSHShellStream does not return any output #591

Open
loralavandrel opened this issue Sep 11, 2024 · 5 comments

Comments

@loralavandrel
Copy link

loralavandrel commented Sep 11, 2024

In version 3.1.3 once connected to Cisco Switches in SSHShellStream running "terminal length 0" with bellow commands to display multiple lines was working fine.
Since 3.2.3 same commands are failing to generate any output.

$shellStream = New-SSHShellStream -SessionId $SessionID.SessionId
$shellStream.WriteLine("terminal length 0")
$shellStream.WriteLine("show interfaces status | include disabled.* 99 ")

I was able to force to import version 3.1.3 as a workaround.

@darkoperator
Copy link
Owner

darkoperator commented Sep 11, 2024 via email

@loralavandrel
Copy link
Author

In version 3.1.3 running mentioned commands in output we have a response from the devices, so the output looks like:

[switch_name]#terminal length 0
[switch_name]#show interfaces status | include disabled.* 99
table of interfaces with specific condition

Running the same in 3.2.3 does return only below output:

[switch_name]#terminal length 0
[switch_name]#show interfaces status | include disabled.* 99

If I remove "terminal length 0" command in 3.2.3 I do have an output of interfaces however they have been truncated as the output is bigger than default 24 lines.

@darkoperator
Copy link
Owner

what would happen if you added a

Start-Sleep -Seconds 2

before the

$shellStream.WriteLine("terminal length 0")

It could be it takes now longer for the shellstream to be created with all the updates the library did and we are hitting a race condition

@loralavandrel
Copy link
Author

Adding "Start-Sleep -Seconds 3" did not resolve it.
I have output generated however I do not see all of the output that is generated like in 3.1.3 version.
In 3.2.3 I can only see the commands that were provided without the generated output from "show interfaces status | include disabled.* 99" command.

@darkoperator
Copy link
Owner

darkoperator commented Sep 12, 2024 via email

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

2 participants