title: Java exec or runtime not working with ssh
body: <p>I'm trying to ssh into ubuntu using exec, but for some reason when I execute from the code I get the error
  port 22: Connection refused</p>
  
  <p>In the code I use concat to put the strings together, but I know they're put together properly because I print them out and if I copy and paste them into the command line then it will ssh properly.
  My code tries:</p>
  
  <pre><code>p1= Runtime.getRuntime().exec(run1);
  p1.waitfor();
  </code></pre>
  
  <p>where </p>
  
  <pre><code>run1 = "ssh -o StrictHostKeyChecking=no -v -i key " + "ubuntu@"+ DNS + " sudo mke2fs -F -j "+device;
  </code></pre>
  
  <p>Any ideas?</p>