Ruby Expect Script

I’m new to Ruby and need to write a script that uses the ruby equivalent
of linux expect to run interactive scripts or commands on remote boxes.

Basically I need to ssh into a box, potentially run a script on that box
that will need questions answered, such as user name, server name, or
other “configuration” items.

Hopefully I didn’t make it sound confusing by the way I’ve presented the
problem.

Does anybody have any examples or know how to do this?

Thanks!

Expect library like behavior can be achieved with use of stock PTY
module
http://ruby-doc.org/stdlib/libdoc/pty/rdoc/PTY.html . Examples included.

David U. wrote in post #1153441:

Expect library like behavior can be achieved with use of stock PTY
module
http://ruby-doc.org/stdlib/libdoc/pty/rdoc/PTY.html . Examples included.

Thanks!