Hi monks,
I've got a remote command which is menu based that I need to invoke via Net::OpenSSH in a hands-off fashion. When I try to run it using the following method, it basically pegs the box and doesn't complete. I'm hoping there's a better method that someone can share with me. Here's an example of what I'm doing, which is to use "/bin/echo" to send the responses with newlines, and pipe them into the interactive program. Any insight would be appreciated.
$ssh = Net::OpenSSH->new($hostname, user => $username, master_stderr_discard => 1}
$command = "cd /usr/local/bin; /bin/echo -e \"input1\ninput2\ninput3\" | interactive_program.pl";
@out = $ssh->capture($command);
Thanks!
-Adam vonNieda