I’ve created a simple script to setup local port forwarding using
net/ssh, but I can’t quite get it to work. My main script is
initializing a websphere JMX over SOAP through a firewall.
This ssh command works, I can access port 9075 over localhost
forwarding remotely with no problems:
bash $ ssh [email protected]_server -L 9075:localhost:9075
I’m trying to recreate that in jruby using this small script:
require ‘java’
require ‘rubygems’
require ‘net/ssh’
Net::SSH.start( ‘dev_server’, ‘chris’,:verbose => :info ) do | session|
session.forward.local( 9075, ‘localhost’,9075 )
session.loop{true}
end
This does not work, my SOAP command just hangs there until I kill it.
Any suggestions? I’d rather do this in JRuby without needing to drop
out to command line to create my tunnels.
Chris
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email