perlknight has asked for the wisdom of the Perl Monks concerning the following question:

All, Here's a snap of a code:
$scp=Expect->spawn("/usr/bin/scp -r \"$srcpath\" ${dest_host}:$destpa
th") 
... 
print $scp("password")
This echoes the password in clear text to screen, I don't want this. Is there a way to have it print "****" or just blanks?

Replies are listed 'Best First'.
Re: Expect.pm and password
by grep (Monsignor) on Feb 13, 2002 at 22:24 UTC
    Well I would suggest a look at the Net::SCP module before you code in Expect. This might end up being a non-issue.

    grep
    grep> rm -f /bin/laden
      Well, it's a nice module if you're already set up RSA keys so that you will login automatically. But in my case, I am not usring RSA keys to authenticate. So, is there a way to make expect print out blanks or "****" to screen while you sending it the password? Thanks in advance for your help.