------ art_172137_16130473.1156776702040 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Damien, If you are truly using key authentication, you should not be prompted for a password. Since you are being prompted, you will either need to use a "here" document or expect to provide the password. Ron On 8/28/06, Damien Damien <mr.damien / hotmail.com> wrote: > > Hi all, > > I am developping and application that connect through ssh to a host and > then try to launch a command with sudo. > I am using the net/ssh library, and I use the key-rsa authentication to > connect (so no password needed). > > ------ > Net::SSH.start(host.name) do |session| > shell ession.shell.sync > shell.send_command("sudo ps -ef") > shell.exit > end > end > ------ > > So the code is locked to the send_command as the host is waiting me to > fill the password. But I don't find anyway of filling it. ".send_data" > doesn't work. > > Did I missed something ? > > Thanks > > -- > Posted via http://www.ruby-forum.com/. > > -- Ron Reidy ------ art_172137_16130473.1156776702040--