title: Bash script login to ssh and run some commands
body: <p>After travis completes and is successful I am trying to run a bash script which I am pretty new to.</p>
  
  <p>I basically want it to login to a remote server and got a pull from the master branch on git and then restart the node.js server</p>
  
  <pre><code>spawn ssh couch@********* -o StrictHostKeyChecking=no
  expect "assword:"
  send "*******\r"
  cd localer
  forever stop server.js
  git pull origin master
  forever start server.js
  exit
  </code></pre>
  
  <p>This is what I have so far but it gives me an error on travis-ci</p>
  
  <pre><code>./deploy.sh: line 1: spawn: command not found
  couldn't read file "assword:": no such file or directory
  ./deploy.sh: line 3: send: command not found
  ./deploy.sh: line 4: cd: localer: No such file or directory
  ./deploy.sh: line 5: forever: command not found
  From git://github.com/*******
   * branch            master     -&gt; FETCH_HEAD
  Already up-to-date.
  ./deploy.sh: line 7: forever: command not found
  </code></pre>
  
  <p>I installed expect in the travis environment but it says send and spawn are not known packages so I assume they are just bash properties.</p>
  
  <p>Hope you can help :)</p>