Sha256: 37091140de871400b7798741035153af19d861f3dc2ced34cbed40b3f107a9ff

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

require 'net/ssh/gateway'
require 'net/http'
include Process

$gateway = Net::SSH::Gateway.new('access.grid5000.fr', 'msimonin')
ports = []

def close()
  $gateway.shutdown!
end


# Trap ^C 
Signal.trap("INT") { 
  close()
  exit
}

# Trap ^C 
Signal.trap("TERM") { 
  close()
  exit
}

remote_host = 'parapide-9.rennes.grid5000.fr'
remote_ports = [5601, 3000]
remote_ports.each do |remote_port| 
port = $gateway.open(remote_host, remote_port) 
  puts "localhost:#{port} forwards to #{remote_host}:#{remote_port}"
end

wait

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-g5k-0.0.16 results/test.rb