darkoperator / Posh-SSH

PowerShell Module for automating tasks on remote systems using SSH
BSD 3-Clause "New" or "Revised" License
985 stars 227 forks source link

NSX Edges "failed to open a channel after 10 attemps" #411

Open guptatarun1989 opened 3 years ago

guptatarun1989 commented 3 years ago

Hi team , May be this question has been asked before here : https://github.com/darkoperator/Posh-SSH/issues/119 .. but i am facing same issue and cant find solution so please help .

I am using posh-SSH to execute command on NSX Edge (NSx-v 6.4.5 Edge) . Below is code

Posh-SSH\New-SSHSession -ComputerName 10.231.251.162 image

$edge=Invoke-SshCommand -SessionId 2 -Command "show system storage" image

I have also tried to execute this command to create a shell stream but same error

$session = New-SSHShellStream -Index 2 $stream = $session.Session.CreateShellStream("admin", 0, 0, 0, 0, 1000) $stream.Write("show system storage`n") $stream.Read()

image

I am using PowerShell 5.1 and posh-SSH version 2.3.0 ..Please help me on solving this .

darkoperator commented 3 years ago

Sadly it is a known issue with that type of device, since I don’t have access to one I have not had a chance to look deeper as to the why.

On Jul 29, 2021, at 3:22 AM, guptatarun1989 @.***> wrote:

Hi team , May be this question has been asked before here : #119 https://github.com/darkoperator/Posh-SSH/issues/119 .. but i am facing same issue and cant find solution so please help .

I am using posh-SSH to execute command on NSX Edge (NSx-v 6.4.5 Edge) . Below is code

Posh-SSH\New-SSHSession -ComputerName 10.231.251.162 https://user-images.githubusercontent.com/62771038/127448159-aaa265db-cf13-4c17-9a0e-2bf4dd4125a0.png $edge=Invoke-SshCommand -SessionId 2 -Command "show system storage" https://user-images.githubusercontent.com/62771038/127448593-8309e301-1a27-4d69-a481-297c98c0e925.png I have also tried to execute this command to create a shell stream but same error

$session = New-SSHShellStream -Index 2 $stream = $session.Session.CreateShellStream("admin", 0, 0, 0, 0, 1000) $stream.Write("show system storage`n") $stream.Read()

https://user-images.githubusercontent.com/62771038/127449162-73b126b4-67ca-42ec-b2d7-ca864e9d389b.png I am using PowerShell 5.1 and posh-SSH version 2.3.0 ..Please help me on solving this .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/darkoperator/Posh-SSH/issues/411, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7IHS7QJXDYZ7ICZCHO3LT2D6UFANCNFSM5BF3QYOA.