title: how to send multiple commands
body: <p>I have this script running on windows. I need help how to add secondary command to cisco devices currently only working on one device. Also how I can print out the result on file instead of the screen.</p>
  
  <pre><code>#!\usr\bin\Perl\bin\perl
  use warnings;
  use strict;
  use NET::SSH2;
  
  my $host = "switchA"; # use the ip host to connect
  my $user = "XXX"; # your account
  my $pass = "XXXX"; # your password
  my $ssh2 = Net::SSH2-&gt;new();
  $ssh2-&gt;debug(0);
  $ssh2-&gt;connect($host) or die "Unable to connect host $@ \n";
  $ssh2-&gt;auth_password($user,$pass);
  
  #shell use
  
  my $chan = $ssh2-&gt;channel();
  
  $chan-&gt;exec('sh int desc');
  my $buflen = 3000;
  my $buf1 = '0' x $buflen;
  $chan-&gt;read($buf1, $buflen);
  print "CMD1:\n", $buf1,"\n";
  
  # run another command  still not working
  $chan-&gt;exec('sh ver');
  my $buflen2 = 3000;
  my $buf2 = '0' x $buflen2;
  $chan-&gt;read($buf2, $buflen2);
  print "CMD2:\n", $buf2,"\n";
  </code></pre>