scalasshammonite

How to ssh with Amonite supplying the password in advance


Problem: I need to access a command line API on a Remote machine.

I am playing with Scala Amonite libs, i wonder if there is a way to ssh and supply the password, so that i can do it from within an application and not have to enter the pass in the middle of it.


Solution

  • It's best to use public key authentication not passwords. It's a best practice regardless, & solves your problem of ssh from inside a script without having to provide a password.