title: When I run a bash script that ssh's into a remote server and run a command like wget it saves on the source not the destination server?
body: <p>I have the following bash script</p>
  
  <pre><code>#!/bin/bash
  ssh -o "StrictHostKeyChecking no" ubuntu@$1
  cd /home/ubuntu
  wget google.com
  </code></pre>
  
  <p>When I run it, <code>./test.sh</code> I am ssh'd into the remote server but the <code>wget</code> command is not run unless I press <strong>ctrl+d</strong> and then the ssh session exits and the <code>index.html</code> file is saved to <code>/home/ubuntu</code></p>
  
  <p>How can I change this bash script so that I can save the <code>index.html</code> file on the remote server?</p>