I have the following script:
#!/usr/bin/env ruby
require \'rubygems\'
require \'net/ssh\'
Net::SSH.start(\'host1\', \'root\', :password => \"mypassword1\
The current location of net-ssh-shell is changed.
What I decided to use though to call a random shell script is to scp a file to the remote machine and source it into shell. Basically doing this:
File.write(script_path, script_str)
gear.ssh.scp_to(script_path, File.dirname(script_path))
gear.ssh.exec(". script_path")