title: SSH command from within a Scala program with pure Scala API or Ammonite API
body: <p>I would like to perform an SSH command and then execute some command on a distant machine from within scala. Both the scala API and Scala Ammonite provide way to execute system command. However I am having problem with ssh. How do i run an ssh command and then run command and get the result back in from within my scala program ? </p>
  
  <h1>EDIT1</h1>
  
  <p>found the following in that post <a href="https://stackoverflow.com/questions/19942386/problems-using-scala-to-remotely-issue-commands-via-ssh">Problems using scala to remotely issue commands via ssh</a></p>
  
  <p>"ssh user@Main.local 'mkdir Desktop/test'".!</p>
  
  <p>I wonder how can this be done with scala Amonite API. I have not been able to find the way.</p>