title: Continuing shell script execution after SSHing into guest machine?
body: <p>I have an Ubuntu guest box setup on my Windows host using Vagrant and VirtualBox.  I'm trying to write a shell script that will...</p>
  
  <ol>
  <li><code>vagrant up</code></li>
  <li><code>vagrant ssh</code> once <code>vagrant up</code> is complete</li>
  <li><code>cd</code> into a specific project directory in the guest machine once successfully SSHed into the guest machine</li>
  </ol>
  
  <p>Right now my vagrant_shell_script.sh file contains the following:</p>
  
  <pre><code>vagrant up &amp;&amp; vagrant ssh &amp;&amp; echo 'cd vagrant/rails_tutorial/sample_app'
  </code></pre>
  
  <p>Everything works fine when I execute it in Git Bash, up to and including connecting via SSH to the guest machine, however after it successfully connects, the script seems to stop working and does not execute the final <code>cd</code> command.  I presume this is because it is no longer able to communicate directly with my host machine through that particular Bash instance (please correct me if I'm wrong).</p>
  
  <p><strong>Is there any way to have it navigate directly to the target directory once the SSH connection is successful?</strong></p>
  
  <p>Please forgive me if this is a dumb question--relatively new to bash scripting.</p>