title: Trying to automate a series of steps which include connecting to server and logging in
body: <p>I am trying to automate a series of steps using a Perl script. In this I need to connect to a server (which manually I do by opening <code>putty.exe</code>), login to it and then execute some commands. </p>
  
  <p>I tried it using <code>NET::SSH::Perl</code> but commands are not getting executed (I am not getting any error message here). Is there any other way I can fix it and proceed or is it something I can't do using Perl? </p>
  
  <pre><code>$host= "mhadli";
  $user= "rshukla";
  $pass= "******";
  $cmd = "ll";
  use Net::SSH::Perl;
  my $ssh = Net::SSH::Perl-&gt;new($host);
  $ssh-&gt;login($user, $pass);
  my($stdout, $stderr, $exit) = $ssh-&gt;cmd($cmd);
  </code></pre>
  
  <p>Any suggestions?</p>