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:

#!/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); }
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.

In reply to Re^2: help to deal with ssh connection by mitchreward
in thread help to deal with ssh connection by mitchreward

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.