title: Using Plink, how to auto-input password into Ubuntu ssh?
body: <p>I'm currently setting up a batch file to ssh from a Windows machine into a Ubuntu machine and issue a series of commands. I'm using plink, and I'm using the <code>-m</code> argument to pass a .txt file with a list of commands. </p>
  
  <p>The batch file code that runs through <code>cmd</code>:</p>
  
  <pre><code>set PATH=c:\path\to\plink.exe
  plink.exe -ssh -t user@ipaddress -pw &lt;psw&gt; -m c:\path\to\textFile\commands.txt
  </code></pre>
  
  <p>The <code>commands.txt</code> code:</p>
  
  <pre><code>sudo -s      #access the root login
  &lt;root psw&gt;   #enter the password for the root login
  command-1    #issue a command in linux as root
  command-2    #issue a command in linux as root
  command-3    #issue a command in linux as root
  </code></pre>
  
  <p>The issue I'm running into is that when I run this batch file, the output within command prompt still prompts the user to manually enter the password. Is there a means to input the password form the next line of the <code>commands.txt</code> file? Or does this process require something else?</p>