in reply to SSH Automation?

Actually, you might want to see the manpages for ssh-keygen and perhaps ssh-agent. Basically you create an RSA key with no password (or use ssh-agent to keep the decrypted key in memory for your process), then run your script without having to deal with the password prompt at all. You'll be using key authentication instead of password auth.

Update: You might also look at Expect, but using a key is generally better than keeping passwords around in crontabs and/or scripts.

--isotope

Replies are listed 'Best First'.
RE: Re: SSH Automation?
by raflach (Pilgrim) on Sep 27, 2000 at 02:48 UTC
    Ok, based on a brief glance at the recommended manpages, that will probably solve the problem.
    For curiosity's sake (and in case it doesn't), Anyone want to take another potshot at this?
      The password is almost certainly being asked of /dev/tty, not standard input. This means that you need to use a pseudo-tty to fake out the program. Pseudo-ttys are managed by Expect and IO::Tty.

      -- Randal L. Schwartz, Perl hacker

      merlyn already offered a solution, but in this case I can say that it does solve the problem. I have a lot of programs which use this to great effect, saving a lot of headaches. (As a security note, why bother having a password for the account at all?:-)