<?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 paramiko + MSA 2000 G2 cli in HPE EVA Storage</title>
    <link>https://community.hpe.com/t5/hpe-eva-storage/paramiko-msa-2000-g2-cli/m-p/4748352#M47929</link>
    <description>Has anyone been able to communicate with the MSA 2000 G2 cli via python and paramiko?  If so, would you mind posting your code?  I guess the fact that the MSA 2000 G2 implementation of the ssh server is non-standard enough that paramiko will not work.  I may have to figure something out with ssh and expect.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jeff</description>
    <pubDate>Thu, 03 Feb 2011 20:31:49 GMT</pubDate>
    <dc:creator>Jeff Hodge</dc:creator>
    <dc:date>2011-02-03T20:31:49Z</dc:date>
    <item>
      <title>paramiko + MSA 2000 G2 cli</title>
      <link>https://community.hpe.com/t5/hpe-eva-storage/paramiko-msa-2000-g2-cli/m-p/4748352#M47929</link>
      <description>Has anyone been able to communicate with the MSA 2000 G2 cli via python and paramiko?  If so, would you mind posting your code?  I guess the fact that the MSA 2000 G2 implementation of the ssh server is non-standard enough that paramiko will not work.  I may have to figure something out with ssh and expect.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jeff</description>
      <pubDate>Thu, 03 Feb 2011 20:31:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-eva-storage/paramiko-msa-2000-g2-cli/m-p/4748352#M47929</guid>
      <dc:creator>Jeff Hodge</dc:creator>
      <dc:date>2011-02-03T20:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: paramiko + MSA 2000 G2 cli</title>
      <link>https://community.hpe.com/t5/hpe-eva-storage/paramiko-msa-2000-g2-cli/m-p/4748353#M47930</link>
      <description>So, I was able to find someone who had a similar issue with a cisco device and copied some of his code.  Here is some code that works:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/env python&lt;BR /&gt;&lt;BR /&gt;import paramiko &lt;BR /&gt;&lt;BR /&gt;def read_until(chan, s): &lt;BR /&gt;  """&lt;BR /&gt;  Reads until s is found, returns data read&lt;BR /&gt;  """ &lt;BR /&gt;&lt;BR /&gt;  buffer=[] &lt;BR /&gt;  &lt;BR /&gt;  while "".join(buffer[-len(s):]) != s : &lt;BR /&gt;    buffer.append(chan.recv(1)) &lt;BR /&gt;  return "".join(buffer) &lt;BR /&gt;&lt;BR /&gt;HOST='hostname'&lt;BR /&gt;ssh=paramiko.Transport((HOST,22))&lt;BR /&gt;paramiko.util.log_to_file('/tmp/paramiko.log')&lt;BR /&gt;ssh.connect(username='manage',password='secretpassword')&lt;BR /&gt;sess = ssh.open_session()&lt;BR /&gt;sess.get_pty()&lt;BR /&gt;sess.invoke_shell()&lt;BR /&gt;print read_until(sess, '#')&lt;BR /&gt;sess.sendall("set cli-parameters pager off\r")&lt;BR /&gt;print read_until(sess, '#')&lt;BR /&gt;sess.sendall("show vdisk")&lt;BR /&gt;print read_until(sess, '#')&lt;BR /&gt;sess.sendall("exit\r")&lt;BR /&gt;ssh.close()</description>
      <pubDate>Thu, 03 Feb 2011 22:51:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-eva-storage/paramiko-msa-2000-g2-cli/m-p/4748353#M47930</guid>
      <dc:creator>Jeff Hodge</dc:creator>
      <dc:date>2011-02-03T22:51:42Z</dc:date>
    </item>
  </channel>
</rss>

