Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Expect.pm and password

by perlknight (Pilgrim)
on Feb 13, 2002 at 22:12 UTC ( [id://145298]=perlquestion: print w/replies, xml ) Need Help??

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://145298]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found