From: James Dinkel Date: 2008-04-18T02:48:03+09:00 Subject: Windows, Net::SSH: how do I send a password to sudo? I'm establishing an ssh connection and then I want to run a command as sudo. Now, normally, the user will be prompted to put in a password to run the command as sudo. Here is my script: ----------- Net::SSH.start( 'files02', 'myuser', 'mypassword' ) do |session| session.open_channel do |channel| channel.on_data do |ch, data| puts data end channel.exec "sudo echo \"hello\"" end session.loop end ------------ But this doesn't prompt for a password ( not surprisingly ) and of course doesn't run the command. Any ideas on how I could get the password prompt to the user? -- Posted via http://www.ruby-forum.com/.