http://qs1969.pair.com?node_id=11145453


in reply to How to incorporate Expect in Perl Script? OR Pass the password via perl script?

Consider using a (passwordless) SSH key to store the access credentials for the remote machine.

Your expect call likely fails because expect or ssh wants a (pseudo-)terminal connected to do their stuff.

Replies are listed 'Best First'.
Re^2: How to incorporate Expect in Perl Script? OR Pass the password via perl script?
by prad001 (Initiate) on Jul 13, 2022 at 12:51 UTC
    The expect command works fine from the command line but I am not sure how to incorporate that in to the perl script that I have mentioned..!