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 ?
EDIT1
found the following in that post Problems using scala to remotely issue commands via ssh
"ssh user@Main.local 'mkdir Desktop/test'".!
I wonder how can this be done with scala Amonite API. I have not been able to find the way.