Phoenix.pm: open sesame
Pablo at zunigatech.com
Pablo at zunigatech.com
Fri May 19 22:15:28 CDT 2000
Greetings:
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:
#!/usr/bin/perl-wT
$ENV{"PATH"} = "";
use strict;
open(SSH, "| /usr/bin/ssh -c 3des -l username 127.0.0.1");
print SSH "my_password";
close(SSH);
----------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 127.0.0.1's password:
------------
I'm wondering how I could "give" SSH the password?
Thanks so much.
-Pablo
More information about the Phoenix-pm
mailing list