thanks guys, that helped me. I finnaly installed Net::SSH and I did something that is not far for working at the moment. I just got a problem with the auth with public key:
How can I specify to use a public key for ssh authentication? I can't get the doc, because http://search.cpan.org seems to be down at the moment.#!/usr/bin/perl use Net::SSH qw(sshopen2); use CGI qw(:standard); use strict; use utf8; print header(); if (param("email")) { my $email = param("email"); my $date = param("date"); print <<ENDHTML; <html> <body> <h1> my script </h1> <br><br> <font color="red"> please type the date in English format, i.e : 1 +2-Apr-2014 </font><br><br> <form action="index.cgi" method="post"> <INPUT type="text" name="date" id="date"><BR><BR> <INPUT type="hidden" name="email" value="$email"> <INPUT type="submit" value="Send"> </form> ENDHTML my $user = "**user**"; my $host = "**host**"; my $cmd = "maili $email del $date"; sshopen2("$user\@$host", *READER, *WRITER, "$cmd") || die "ssh: $!"; while (<READER>) { chomp(); print "$_\n"; } close(READER); close(WRITER); }
In reply to Re^2: help to deal with ssh connection
by mitchreward
in thread help to deal with ssh connection
by mitchreward
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |