open sesame

Pablo at Pablo at
Fri May 19 22:15:28 CDT 2000

Hope everyone is doing well. 

I'm looking to automate logging into a server and
I wanted to see if I could do it with perl, meaning, use perl as a shell
script. I don't plan on using this script as a CGI script! :) 
but use it like any shell script, to automate tasks...

I noticed this book won't be out till July:
Perl for System Administration 
by David N. Blank-Edelman, Linda Mui (Editor)  

Here's what I've tried so far:
----------the script:


$ENV{"PATH"} = "";

use strict;

open(SSH, "| /usr/bin/ssh -c 3des -l username");
print SSH "my_password";

----------and what I get in response:

[terminal]# perl s_download_db.cgi  (here I execute the script)

Pseudo-terminal will not be allocated because stdin is not a terminal.
username at's password: 


I'm wondering how I could "give" SSH the password? 

Thanks so much.


More information about the Phoenix-pm mailing list