Class | Rye::Hop |
In: |
lib/rye/hop.rb
|
Parent: | Object |
MAX_PORT | = | 65535 | The maximum port number that the gateway will attempt to use to forward connections from. | |
MIN_PORT | = | 1024 | The minimum port number that the gateway will attempt to use to forward connections from. |
The opts hash excepts the following keys:
NOTE: opts can also contain any parameter supported by Net::SSH.start that is not already mentioned above.
Compares itself with the other box. If the hostnames are the same, this will return true. Otherwise false.
Open an SSH session with +@rye_host+. This called automatically when you the first comamnd is run if it‘s not already connected. Raises a Rye::NoHost exception if +@rye_host+ is not specified. Will attempt a password login up to 3 times if the initial authentication fails.
is true. When set to false, connect will do nothing if already connected.
Close the SSH session with +@rye_host+. This is called automatically at exit if the connection is open.
Reconnect as another user. This is different from su= which executes subsequent commands via +su -c COMMAND USER+.
NOTE: if there is an open connection, it‘s disconnected but not reconnected because it‘s possible it wasn‘t connected yet in the first place (if you create the instance with default settings for example)
to the set. Hostnames will be used to create new instances of Rye::Hop h1 = Rye::Hop.new "host1" h1.via_hop "host2", :user => "service_user"
OR
h1 = Rye::Hop.new "host1" h2 = Rye::Hop.new "host2" h1.via_hop h2