# File lib/net/ssh/service/forward.rb, line 119 def remote(port, host, remote_port, remote_host="127.0.0.1") session.send_global_request("tcpip-forward", :string, remote_host, :long, remote_port) do |success, response| if success debug { "remote forward from remote #{remote_host}:#{remote_port} to #{host}:#{port} established" } @remote_forwarded_ports[[remote_port, remote_host]] = Remote.new(host, port) else error { "remote forwarding request failed" } raise Net::SSH::Exception, "remote forwarding request failed" end end end