Microsoft Virtualization Discussions

Re: Invoke-NcSsh failing with ONTAP 9.3


Please that will save me from testing...



Can someone comment on why putty is required, and what the toolkit was changed to use putty?

Re: Invoke-NcSsh failing with ONTAP 9.3

I just tested and Putty .70 was required. The test was successful though. 

Re: Invoke-NcSsh failing with ONTAP 9.3

Does putty have to be installed in native path.


I currently have it in my path statement in c:\windows\system32

Re: Invoke-NcSsh failing with ONTAP 9.3

I installed it into its native path. 

Re: Invoke-NcSsh failing with ONTAP 9.3

tested & fixed with NetApp powershell toolkit 4.5P1, .net 4.5+ & Putty v0.70 on Server 2012 (In my case i also needed to "Run As Administrator" powershell)


But did anyone get this fixed and its working on Server 2008? I still receive this error: invoke-ncssh : An established connection was aborted by the software in your host machine. on Server 2008 with the same set of fixes\pre-req's.







Re: Invoke-NcSsh failing with ONTAP 9.3

I’ve only ever run from windows 7 and windows 10...always had same results.

Re: Invoke-NcSsh failing with ONTAP 9.3

I have been noticing some interesting things when running the powershell toolkit with the latest putty in windows 10. I have set the execution policy on maching to unrestricted. Previously I would just right click my .PS1 file and run with powershell and everything would work fine. Now when I run things this way I get the following error.


PS>TerminatingError(Invoke-NcSsh): "Requested registry access is not allowed."
Invoke-NcSsh : Requested registry access is not allowed.



If I open powershell as an admin and run from the command line that error goes away. Any ideas?

Re: Invoke-NcSsh failing with ONTAP 9.3

This is a result of the fix for the broken Invoke-NcSsh cmdlet with the newest versions of uses PuTTY to make the SSH call now instead of a library shipped with PSTK.  The error you're seeing is because behind the scenes it's accessing the registry to, I believe, determine the location of the PuTTY (or, rather, plink) executable.  Normally, that registry key requires administrator level privileges to access, hence why you see the error go away when using an elevated PowerShell prompt.


You can "fix" it by adjusting the permissions on the the key, as described here.



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

Re: Invoke-NcSsh failing with ONTAP 9.3

One issue I encountered on W2K12R2, even after installing Putty 64-bit V0.70, was that PowerShell kept saying:

     Please install putty (version putty-64bit-0.70) on your machine to use this cmdlet.


I used SysInternal's 'Procmon.exe' utility to monitor PowerShell's access to the registry, and I saw that it was looking for this registry key:


It turned out that my W2K12R2 server didn't have a registry key called 'PuTTY64', it had 'PuTTY'.  I added '64' to the registry key, so it looked like 'PuTTY64', and then the InovkeNcSsh cmdlet worked like it was supposed to.


I suspect that I had a 32-bit version of PuTTY installed prior to installing the 64-bit version, and the registry key didn't get updated to 'PuTTY64', since it already existed.


I made sure that the permission were as described elsewhere in a the thread that asulliva linked to:

   All application packages: Full Control
   Users (of the local machine your on): Full Control


I hope that this information helps others who are trying to get the InovkeNcSsh cmdlet to work.


Re: Invoke-NcSsh failing with ONTAP 9.3

After following all the required instructions and troubleshooting steps we are still receiving the same error:



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



- Windows Server 2012 R2 (Version 6.3 Build 9600)


- NA PSTK 4.6.0



Major  Minor  Build  Revision
-----  -----  -----  --------
4      2      0      0


- Putty release 0.70 (32/64) installed in native Path: C:\Program Files (x86)\PuTTY // C:\Program Files\PuTTY


- ONTAP 9.3P2


- granted permissions "Full Controll" to "All application packages" in registry for "HKEY_LOCAL_MACHINE"\SOFTWARE\SimonTatham"


- copied putty and plink to "C:\Program Files (x86)\NetApp\NetApp PowerShell Toolkit\Modules\DataONTAP"


- rebooted server



Commands are working fine for ONTAP 9.2 systems from the same enviroment.


What are we missing? Any hints?