$ssh->waitfor("Changing password for $uName.\n(current) UNIX password: ", 2) or die
According to the documentation, waitfor takes a regex as the first argument, not a string. You will need either to escape the brackets or use quotemeta or some other approach where the pattern actually matches what is returned.
In reply to Re: Not able to execute command in remote machine Using Net::SSH::Expect
by hippo
in thread Not able to execute command in remote machine Using Net::SSH::Expect
by santy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |