in reply to Net::OpenSSH error

Try:
$ssh->system({stdin_data => $userstring}, "/usr/sbin/chpasswd");
or
$ssh->system("echo", $userstring, \\"|", "/usr/sbin/chpasswd")

Replies are listed 'Best First'.
Re^2: Net::OpenSSH error
by kdamundson (Initiate) on Apr 01, 2011 at 15:31 UTC
    Thanks for the help. To get it to work, I needed to embed single quotes around the "userstring".
Re^2: Net::OpenSSH error
by kdamundson (Initiate) on Apr 04, 2011 at 18:14 UTC
    Thanks, I got it to work. It required putting single quotes around the command that is piped to chpasswd