in reply to Re^6: Perl script in cron
in thread Perl script in cron

As I recall the switch that I used was not in the documentation. :( I cannot help you because the code I wrote was at a previous job and I no longer have access to it. :(

If you don't get your answer here do try the mailing list. Someone will respond to your request. Good luck.

Replies are listed 'Best First'.
Re^8: Perl script in cron
by bashi (Acolyte) on Dec 19, 2006 at 14:11 UTC
    OK ... I kicked on debugging and it seems to be a problem with the key passphrase in batchmode:
    nw05: Trying empty user-authentication request. nw05: Authentication methods that can continue: publickey,keyboard-int +eractive. nw05: Next method to try is publickey. nw05: Trying pubkey authentication with key file '/root/.ssh/id_rsa.pu +b' nw05: Will not query passphrase for '/root/.ssh/id_rsa.pub' in batch m +ode. nw05: Loading private key failed. Permission denied at /root/bin/getsysinfo.pl line 43

    Gonna take a closer look on this.

    /Roger

      If I didn't know better, I'd say ssh is detecting the lack of a terminal and assuming it's in batch mode. I thought Net::SSH was native perl, but now I wonder if it has forked a /bin/ssh? ssh will definitely drop into "batch mode" from chron unless it's told not to do so, and afaik it won't accept passwords when it considers itself to be non-interactive.

      Perhaps you should set up a keypair?

      Update: duh. The native perl ssh has a different name: Net::SSH::Perl

      -Paul

        Well, Im out of idea's here I guess. Do I have to revert to feeding it with password (automaticly) perhaps :-(