Wednesday, 11 September 2013

perl ssh without module

perl ssh without module

i cannot install modules such as net::ssh because i do not have
authorization, and other more complicated reasons - so i have to do this
the old fashion way,
my $host = "box215";
my $cmd_proc = "/bin/ps -ef";
my $cmd_disk = "df -h";
my $cmd = "ssh -n -o ConnectTimeout=20 $host '$cmd_proc ; $cmd_disk' ";
is what i have so far.
i want to basically get the processes and disk space from the box and
return it. however i am not sure how to handle the password prompt for the
box.

No comments:

Post a Comment