in reply to calling a sh command which then asks for a password

It's not to connect to another machine using ssh, it's just to run a program on the same box that requires a password in order to do so.There must be a simple way ?
TIA
  • Comment on Re: calling a sh command which then asks for a password

Replies are listed 'Best First'.
Re: Re: calling a sh command which then asks for a password
by Thelonius (Priest) on Oct 18, 2002 at 16:05 UTC
    It's not to connect to another machine using ssh, it's just to run a program on the same box that requires a password in order to do so.There must be a simple way ?
    In the general case, no. A lot of programs that ask for passwords do not read them from the standard input, they open /dev/tty instead. For those, you'll have to use a telnet/ssh solution.

    That is, unless they have a command line option to give the password.