Microsoft Virtualization Discussions

Invoke-NaSsh not working anymore with DOT 8.2.5 7-mode

mark_schuren
22,728 Views

Hi all,

 

I upgraded one of our lab systems from ONTAP 8.2.4 to 8.2.5 (7-mode). Since that some of my scripts fail when doing "Invoke-NaSsh" against that system.

 

No idea why, I already regenerated SSH keys but error persists. It used to work with 8.2.4. And it's definitely not a credential issue.

 

PS C:\Users\mark> invoke-nassh -Name ucnlabfiler07 -Command date

invoke-nassh : An established connection was aborted by the software in your host machine.
In Zeile:1 Zeichen:1
+ invoke-nassh -Name ucnlabfiler07 -Command date
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (:) [Invoke-NaSsh], SshConnectionException
    + FullyQualifiedErrorId : SshExecFailed,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNaSsh

 

Any ideas? Does ONTAP reject the client's key length? How can I make it work again?

 

Cheers,

Mark

57 REPLIES 57

mark_schuren
9,807 Views

Tested here with success as well.  Thanks for the workaround, this helps in 95% of my scripts.

 

 

It's not a complete solution for me, because here and there I (mis-)use Invoke-NaSsh to verify if a (Netapp) device is reachable and responding via SSH (port 22) protocol.

Your workaround uses API, which is now perfectly working for doing CLI stuff, but still I have no tool to really "SSH into the target" (e.g. for connectivity tests).

 

So I would still appreciate if the next PSTK could include newer / better SSH client code that fixes the issue.

 

However, thanks a lot for your work!

Mark

asulliva
9,795 Views

Hello @skellner,

 

Happy to see that you found a work around, however please keep in mind a couple of things about the system-cli API...

 

  • It is an unsupported API, which means that things may not behave as expected
  • It is a "private" API, which also means that NetApp actively discourages it's use
  • The output buffer for system-api is relatively small.  If the output of the CLI operation exceeds that buffer, then the API call will fail, even though the CLI operation may have succeeded.

PSTK 4.5 was released this morning, if you are able, please test with that version so that we can verify it is either still broken or was fixed.

 

Thank you!

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

mark_schuren
9,786 Views

I just tested again with PSTK 4.5:

 

PS C:\Users\mark> Import-Module dataontap
PS C:\Users\mark> Get-NaToolkitVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
4      3      0      0

 

(^^ this is not showing 4.5, but 4.5 is installed correctly!)


PS C:\Users\mark> $cred = Get-Credential

(entered corrent root credentials for my 7mode lab filer)


PS C:\Users\mark> Connect-NaController ucnlabfiler07 -HTTPS -Credential $cred

Name                 Address           Ontapi   Version
----                 -------           ------   -------
ucnlabfiler07        10.230.x.x       1.21     NetApp Release 8.2.5 7-Mode: Wed Jul 19 03:55:53 PDT 2017

 

^^ API connect works fine via HTTPS


PS C:\Users\mark> Invoke-Nassh -Controller ucnlabfiler07 -Command version -Credential $cred
Invoke-Nassh : An established connection was aborted by the software in your host machine.
In Zeile:1 Zeichen:1
+ Invoke-Nassh -Controller ucnlabfiler07 -Command version -Credential $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (:) [Invoke-NaSsh], SshConnectionException
    + FullyQualifiedErrorId : SshExecFailed,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNaSsh

 

 

^^ SSH connect does not

nathane
9,472 Views

Not to go off topic, but I am experiencing the same error on OnTap cDot 9.3 after upgrading from 9.2P1 with both PSTK 4.3 and 4.5.  Not sure if that would be beneficial to add to the bug you mentioned or not.

 

Thanks

 

ThomasKr
9,122 Views

is there any progress with that issue?

JGPSHNTAP
9,118 Views

I have pressured our SAM.  I'm supposedly getting a development build to test.

MartinBoere
8,954 Views

I have tested the following,
  
   * installing WFA 4.2.0.1
   Tested invoke-nassh and gave an error on :
  
   PS C:\Users\Administrator> invoke-NaSsh -ControllerName 10.64.20.190 -cred root -command "vol status"
   invoke-NaSsh : An established connection was aborted by the software in your host machine.
   At line:1 char:1
   + invoke-NaSsh -ControllerName 10.64.20.190 -cred root -command "vol status"
   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       + CategoryInfo          : InvalidResult: (:) [Invoke-NaSsh], SshConnectionException
       + FullyQualifiedErrorId : SshExecFailed,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNaSsh
  
   The module that is now installed within powershell is
   Import-Module 'C:\Program Files\NetApp\WFA\PoSH\Modules\DataONTAP'
  
   PS C:\Users\Administrator> get-module | Format-Custom -Property name, path
  
   class PSModuleInfo
   {
     Name = DataONTAP
     Path = C:\Program Files\NetApp\WFA\PoSH\Modules\DataONTAP\DataONTAP.psd1
   }
  
   PS C:\Users\Administrator> get-module
  
   ModuleType Version    Name                                ExportedCommands
   ---------- -------    ----                                ----------------
   Manifest   4.3.0      DataONTAP                           {Add-NaAggr, Add-NaCifsShare, Add-NaCredential, Add-NaFpol...
   Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
   Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
  
   Here we can see that the module has version 4.3.0 however in the documentation of WFA 4.2.0.1 we state that we use 4.5!
  
   Once installing PSTK 4.5 (https://mysupport.netapp.com/tools/download/ECMLP2310788DT.html?productID=61926&pcfContentID=ECMLP2310788) on the same server gave us the possibility to run
  
   PS C:\Users\Administrator> invoke-NaSsh -ControllerName 10.64.20.190 -cred root -command "vol status"
            Volume State           Status                Options
              vol0 online          raid_dp, flex         root
                                   64-bit
          testvol1 online          raid_dp, flex
                                   sis
                                   64-bit
       source_7mtt online          raid_dp, flex
                                   64-bit
  
   As it now seems we are did not package the correct PSTK into WFA 4.2.0.1 and once installing the pack manually we are able to correctly contact a ONTAP 8.2.5 filer.

ThomasKr
8,829 Views

Hi,

i did install 4.5 and puttz 0.70

but i still get errors

 

PS C:\Users\z270170\Desktop> Import-Module NetAppDocs

 

invoke-NaSsh -ControllerName na90ch6.org.oebb.at -Credential z270170 -command "vol status"

invoke-NaSsh : An established connection was aborted by the software in your host

machine.

At line:3 char:1

+ invoke-NaSsh -ControllerName na90ch6.org.oebb.at -Credential z270170 -command "v ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidResult: (:) [Invoke-NaSsh], SshConnectionException

+ FullyQualifiedErrorId : SshExecFailed,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Ssh

.InvokeNaSsh

 

 

 

br

thomas

MartinBoere
8,825 Views

Thomas, 

 

 

 

Was there allready a old version installed of the PSTK?

Did you close the powershell window and opened it again.The commandlets needs to be loaded correctly.

 

I had the same thing within lab on the first try.

 

regards,

 

Martin

TMADOCTHOMAS
6,985 Views

Is there a workaround for this yet? Latest OS release is 8.2.5 P1D4. Does anyone know if this version patches the issue? We are looking to possibly upgrade to 8.2.5 but won't do it if this issue is unresolved.

nathane
6,985 Views

Hello

 

The PowerShell Toolkit was updated a week or so ago and the release notes mention a fix for Invoke-NcSsh and NaSsh.  I haven't had a chance to fully test as of yet

 

Version 4.5P1

 

https://mysupport.netapp.com/tools/info/ECMLP2310788I.html?platformID=30462&productID=61926&pcfContentID=ECMLP2310788

 

n

shruthihr
6,921 Views

Hi,

 

Invoke-NaSsh command issue has been fixed and is a part of  C-Dot 1.4.2 pack .Which is released in the Automationstore.

Please find the link...https://automationstore.netapp.com/pack-detail.shtml?packUuid=WFA_pack_for_managing_Clustered_Data_ONTAP&packVersion=1.4.2

 

 

Thanks,

Shruthi

 

 

TMADOCTHOMAS
6,668 Views

Thanks @. What about for 7-mode 8.2.5?

ThomasKr
6,661 Views

I did test it with the new NetApp_PowerShell_Toolkit_4.5.1.0, but it didnt change anything regarding 7-Mode 8.2.5

 

any other suggestion what to do?

 

 

still getting the following error message:

Invoke-NaSsh : An established connection was aborted by the software in your host machine.

 

+ Invoke-NaSsh -Name na42lz "disk show -n"

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidResult: (:) [Invoke-NaSsh], SshConnectionException

+ FullyQualifiedErrorId : SshExecFailed,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNaSsh

 

shruthihr
6,633 Views

Hi @ThomasKr,

 

After importing the C-dot 1.4.2 pack.Please install putty-64bit-0.70-installer as it is prerequisities .

 

Please close the ISE window and re-launch it and test the commandlets once again .

 

Thanks,

Shruthi

ThomasKr
6,611 Views

Hi,

 

i have downloaded the wfa-cdot-1.4.2-4779867.dar file but how do i import it?

 

br

Thomas

TMADOCTHOMAS
6,593 Views

From the menu choose Administration, Import.

ThomasKr
6,727 Views

I just read that OnCommand Unified Manager 7.3 has to be installed, i guess it has to be imported there

 

i never had any unified manager installed on the maschine that i use for my powershell scripts

ThomasKr
6,723 Views

And 7.3 is for CDot we run only 7-Mode Clusters till now.

 

In the second half of this year we will change every Cluster to a CDot one, but we need the 7-Mode to work under PowerShell now

MartinBoere
6,717 Views

@ThomasKr

 

I just imported the pack within WFA 4.2.0.0.1 and it updated the Powershell pack during this process.

 

After manual importing the powershell pack with :

 

 

PS C:\Users\Administrator> Import-Module  'C:\Program Files\NetApp\WFA\PoSH\Modules\DataONTAP'

 

I was able to connect to a 8.2.5 filer :

 

PS C:\Users\Administrator> Invoke-NaSsh -name 10.128.229.242 -cred root -Command "disk show -n"
disk show: No unassigned disks
PS C:\Users\Administrator>
PS C:\Users\Administrator>
PS C:\Users\Administrator>
PS C:\Users\Administrator>
PS C:\Users\Administrator> Invoke-NaSsh -name 10.128.229.242 -cred root -Command "vol status"
         Volume State           Status                Options
           vol1 online          raid_dp, flex         create_ucode=on, convert_ucode=on
                                64-bit
           vol0 online          raid_dp, flex         root, create_ucode=on, convert_ucode=on

                                64-bit

 

Please see the filer output so here you can see that i am connecting to a 8.2.5 filer.

 

fas8040-cn> ifconfig e0M
e0M: flags=0x2b4c867<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM,MGMT_PORT> mtu 1500
        inet 10.128.229.242 netmask 0xffffff00 broadcast 10.128.229.255 noddns
        ether 00:a0:98:54:5f:ca (auto-1000t-fd-up) flowcontrol full
fas8040-cn> version
NetApp Release 8.2.5 7-Mode: Wed Jul 19 03:55:53 PDT 2017

 

Regarding the note of UM 7.3, i assume that it should be added support for UM 7.3.

Within my WFA instance it now has a UM 7.2 and 7.3 instance configured.

 

 

 

ThomasKr
6,713 Views

Okay i will install Unified Manager 7.3 and give it a try

Thanks for your input!

Public