Hi all,
 I am facing a very strange problem with Net::SSH::Perl. This is my code
which is in while(1) loop.

<SNIP>

 eval
    {
        alarm 15;
        $ssh = Net::SSH::Perl->new($config{$gsp_name}, protocol=>2,
debug=>1, port=>22);
    } || return (telnet("SSH Error: SSH session could not be
instantiated! Trying with Telnet now! \n"));

    log_status_and_error ("Before login!");
    #Now try to do a login. Same reason for the need of eval as above.
    eval
    {
        $ssh->login ($config{$gsp_login}, $config{$gsp_pw});
    }  || return(telnet("SSH Error: Login failed! Trying with Telnet
now! \n"));

    log_status_and_error ("After login!");
    $alrm = 0;
    log_status_and_error ("Before if for shell !");
    if ( !$@ )
    {
        system("touch $sshfile");
        log_status_and_error ("Before creating a shell!");
        eval
        {
            $ssh->shell();
         };
     }

</SNIP>
 
After 4 hours of successful execution, my program dies suddenly.
Sometimes it never dies.
I do not know why this is happening. However I have noticed that when it
dies, it dies at login. Can somebody throw light upon this strange
behaviour ?

Thanks,
Archana

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to