# File lib/net/ssh/service/forward.rb, line 146 146: def cancel_remote(port, host="127.0.0.1") 147: session.send_global_request("cancel-tcpip-forward", :string, host, :long, port) do |success, response| 148: if success 149: @remote_forwarded_ports.delete([port, host]) 150: else 151: raise Net::SSH::Exception, "could not cancel remote forward request on #{host}:#{port}" 152: end 153: end 154: end