<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Invoke-NcSsh Does Not Close Putty in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/140948#M5810</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your issue might relate to BUG #1167414. A workaround would be to use "Invoke-NcSystemApi" instead of "Invoke-NcSsh" to avoid using Putty. I posted an example here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2" href="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2" target="_blank"&gt;https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that's useful&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
    <pubDate>Sat, 16 Jun 2018 06:30:23 GMT</pubDate>
    <dc:creator>mbeattie</dc:creator>
    <dc:date>2018-06-16T06:30:23Z</dc:date>
    <item>
      <title>Invoke-NcSsh Does Not Close Putty</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/140928#M5809</link>
      <description>&lt;P&gt;Using PowerShell Toolkit 4.6 and Putty 0.70.&amp;nbsp; Using the Invoke-NcSsh cmdlet.&amp;nbsp; Used the same cmdlet in the same script prior to upgrading the toolkit without issue.&amp;nbsp; The cmdlet functions; however, when the SSH data is returned, the SSH session is not closed and Putty remains open.&amp;nbsp; This creates a problem if calling Invoke-NcSsh multiple times in the same script.&amp;nbsp; Without it gracefully exiting you can get beyond the maximum SSH sessions on the cluster with an alert such as this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;xinetd.hit.per.source.limit: Maximum number of network connections of 32 received from the remote host x.x.x.x for the service ssh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then while calling the cmdlet in this condition you get this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Invoke-NcSsh : Index was out of range. Must be non-negative and less than the size of the collection.&lt;BR /&gt;Parameter name: index&lt;BR /&gt;At C:\Downloads\RiskResolverCertificate.ps1:306 char:34&lt;BR /&gt;+ $GetCertificateResults = Invoke-NcSsh $GetCertificateCommand&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt; + CategoryInfo : InvalidResult: (:) [Invoke-NcSsh], ArgumentOutOfRangeException&lt;BR /&gt; + FullyQualifiedErrorId : SshExecFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNcSsh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a cmdlet that should be called to close the SSH session or a parameter to pass to ensure it is closed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:36:41 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/140928#M5809</guid>
      <dc:creator>mcgue</dc:creator>
      <dc:date>2025-06-04T13:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSsh Does Not Close Putty</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/140948#M5810</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your issue might relate to BUG #1167414. A workaround would be to use "Invoke-NcSystemApi" instead of "Invoke-NcSsh" to avoid using Putty. I posted an example here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2" href="https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2" target="_blank"&gt;https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/highlight/true/page/2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that's useful&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 06:30:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/140948#M5810</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-06-16T06:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSsh Does Not Close Putty</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/140953#M5812</link>
      <description>&lt;P&gt;Well that's a match, thanks for pointing it out.&amp;nbsp; I'll follow that BURT.&amp;nbsp; I don't think I can get what I need from the API but I'm going to try som ideas.&amp;nbsp; Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 04:33:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/140953#M5812</guid>
      <dc:creator>mcgue</dc:creator>
      <dc:date>2018-06-18T04:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSsh Does Not Close Putty</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150841#M6036</link>
      <description>&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/3949"&gt;@mcgue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see that BUG&amp;nbsp;&lt;STRONG&gt;1167414 &lt;/STRONG&gt;is not fixed.&lt;/P&gt;
&lt;P&gt;Could you please suggest an alternative solution to overcome this BUG, if you have any&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using Powershell for storage automation, the PS script will communicate to NetApp (ONTAP Cloud Ver:9.3) to pull the snap list information. Since, the SSH sessions are not being closed after each query. I get the error&amp;nbsp; "&lt;SPAN&gt;Invoke-NcSsh : Index was out of range. Must be non-negative and less than the size of the collection".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've to kill the SSH session for the query to work again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anantha&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 15:10:30 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150841#M6036</guid>
      <dc:creator>Ananthag</dc:creator>
      <dc:date>2019-09-10T15:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSsh Does Not Close Putty</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150856#M6038</link>
      <description>&lt;P&gt;I'm checking with engineering, but I think this was fixed but just not updated in the bug report to reflect as such.&amp;nbsp; Are you getting the same issue even with the most current PowerShell toolkit?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 01:26:02 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150856#M6038</guid>
      <dc:creator>mcgue</dc:creator>
      <dc:date>2019-09-11T01:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSsh Does Not Close Putty</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150886#M6040</link>
      <description>&lt;P&gt;Thanks for the response.&lt;/P&gt;
&lt;P&gt;I could fix the issue within the script by applying workaround commands.&lt;/P&gt;
&lt;P&gt;Currently, I'm using the PowerShell toolkit version 4.4.&amp;nbsp;Will install the latest PS Toolkit version to see if the issue is resolved.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Anantha&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 17:16:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150886#M6040</guid>
      <dc:creator>Ananthag</dc:creator>
      <dc:date>2019-09-11T17:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-NcSsh Does Not Close Putty</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150934#M6042</link>
      <description>&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/3949"&gt;@mcgue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I installed the latest NetApp's PowerShell tool kit (ver 9.6.0). I don't see multiple stale ssh connection after the query. But, it maintains one stale SSH connection always even after completion of the query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The conclusion is that with the latest PS kit, issue is minimized but not resolved completely.&lt;/P&gt;
&lt;P&gt;I'm good with the workaround that I found for this issue.&lt;/P&gt;
&lt;P&gt;Thanks for the help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 18:43:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Invoke-NcSsh-Does-Not-Close-Putty/m-p/150934#M6042</guid>
      <dc:creator>Ananthag</dc:creator>
      <dc:date>2019-09-12T18:43:19Z</dc:date>
    </item>
  </channel>
</rss>

