title: capistrano: execute without ssh when server is localhost
body: <p>I am using capistrano with multistage extension to deploy easily on staging and production servers.</p>
  
  <p>I implemented a lot of tasks, doing setup stuff on the servers. For the different stages I have files like deploy/staging.rb or deploy/production.rb with only some hostname and username changes.</p>
  
  <p>When I create a stage "localhost" with this setting:</p>
  
  <pre><code>set :server, "localhost"
  </code></pre>
  
  <p>everything is correctly executed on my local computer. But it is executed with ssh. I have colleagues, not running a ssh server on their computer. So the question is:</p>
  
  <p>How do I tell capistrano to do all command executions invoked by <code>run</code> or <code>capture</code> without ssh? I do not want to implement every task a second time with <code>run_locally</code>.</p>