# File lib/net/ssh/service/forward.rb, line 156 156: def cancel_remote(port, host="127.0.0.1") 157: session.send_global_request("cancel-tcpip-forward", :string, host, :long, port) do |success, response| 158: if success 159: @remote_forwarded_ports.delete([port, host]) 160: else 161: raise Net::SSH::Exception, "could not cancel remote forward request on #{host}:#{port}" 162: end 163: end 164: end