From: "wbsurfver@..." Date: 2008-02-08T00:09:57+09:00 Subject: Re: using net::ssh shell to sudo to another user and execute commands On Feb 7, 10:00 am, yermej wrote: > On Feb 7, 8:22 am, "wbsurf...@yahoo.com" wrote: > > > The following program does not get past the part where sudo asks for a > > password. Any ideas ? > > This is run from windows onto a linux box, so I can't use a local ssh > > command. > > This is just a guess as I haven't used Net::SSH, but you might need to > append a newline to the password that's being sent to sudo. > > Also, there are Win32 ports of the ssh client so you probably could > use a local ssh command. Thanks, Adding a newline didn't work. The remote host will prompt with "Password:" . Is it possible I have to read that prompt out of the stream ? Is it possible that linux sudo reads the password from the terminal and not stdin ? In order to use win32 ssh, I have to install that from someplace so that I can use it from a DOS shell I think you mean ? Otherwise if I try to do ssh inside of a ruby process it won't work.