in reply to Perl script in cron

Aren't RSA and DSA keys generally tied to a specific user account (and, in some cases, also a specific hostname)? If you're running out of cron, isn't it possible that you're running as a different user (e.g., root), and that your RSA and DSA keys are not valid for the other user account, only for yours?


Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. You can just call me "Mister Sanity". Why, I've got so much sanity it's driving me crazy.

Replies are listed 'Best First'.
Re^2: Perl script in cron
by bashi (Acolyte) on Dec 19, 2006 at 14:59 UTC
    Well, the script is executed as the root user using roots rsa/dsa keys so I cant see that would be the problem. After turning on debugging for SSH in the script I found out that the passphrase authentication for the keys dont work under batchmode. And here is where I am at the moment, stuck :-) /Roger
      Net::SSH::Perl always reads passwords and passphrases from the terminal (the tty). Passphrases therefore don't work in batch mode, by design. See Is Net::SSH::Perl broken for login via explicit user/password? for more info.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
        So, the conclusion is that it does not work to use Net::SSH::Perl in batchmode without feeding the script password and by that giving up on RSA/DSA authentication with keys?