Scenerio: I\'d like to run commands on remote machines from a Java program over ssh (I am using OpenSSH on my development machine). I\'d also like to make the ssh connecti
Rather than using an external ssh program, why not use a Java ssh library:
Are two I found with google - that'll avoid the problem that openssh will be working very hard to prevent entering the password on stdin - it'll be opening the terminal directly. expect has to work very hard to simulate a tty in order to work.