Net:SSH , how to give password for Sudo commands

I am using net/ssh (script) to SSH into an ubuntu box and install a
package using sudo apt-get install xyz

Issue is how to provide password in my script?

Please help
thanks

···

--
Posted via http://www.ruby-forum.com/.

This works

···

--
Posted via http://www.ruby-forum.com/.