That won't work, because ssh asks for a password, and wants to read that from the terminal, not from STDIN. You can try to use Net::SSH::Expect as a workaround.
In reply to Re: executing command with Net::SSH2
by moritz
in thread executing command with Net::SSH2
by sameerperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |