title: Batch file to telnet and run commands on a unix server
body: <p>I'm stuck here, and I really can use your help. Here's my situation.</p>
  
  <p>Im looking forward to create a batch script which can access a unix server using telnet. Here the unix sever will ask for username/password. After it has authenticated the user, i want to preform some operations like chown on a perticular file. </p>
  
  <p>Here's what im looking to do :</p>
  
  <pre><code>    telnet
      open xyz.abc.com
      username
      password
  
      command 1
      command 2
      command 3
      exit 
  </code></pre>
  
  <p>where </p>
  
  <pre><code>xyz.abc.com is the unix server where i want to connect.
  username and password are the credentials to access this server 
  command 1,command 2,command 3 are the commands i want to run in the server.
  </code></pre>
  
  <p>My problem is i cant use SSH.
  It should take all the data from the file instead of prompting the user to enter data and should run as an automated script.</p>