Class: Remotus::SshConnection::GatewayConnection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/remotus/ssh_connection.rb

Overview

Internal gateway connection class to allow for the host and metadata to be pulled for the gateway by authentication credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port = REMOTE_PORT, metadata = {}) ⇒ GatewayConnection

Creates a GatewayConnection

Parameters:

  • host (String)

    hostname

  • port (Integer) (defaults to: REMOTE_PORT)

    remote port

  • metadata (Hash) (defaults to: {})

    associated metadata for this gateway



64
65
66
67
68
# File 'lib/remotus/ssh_connection.rb', line 64

def initialize(host, port = REMOTE_PORT,  = {})
  @host = host
  @port = port
  @metadata = 
end

Instance Attribute Details

#connectionNet::SSH::Gateway

Returns connection gateway connection.

Returns:

  • (Net::SSH::Gateway)

    connection gateway connection



52
53
54
# File 'lib/remotus/ssh_connection.rb', line 52

def connection
  @connection
end

#hostString (readonly)

Returns host gateway hostname.

Returns:

  • (String)

    host gateway hostname



46
47
48
# File 'lib/remotus/ssh_connection.rb', line 46

def host
  @host
end

#portInteger (readonly)

Returns Remote port.

Returns:

  • (Integer)

    Remote port



49
50
51
# File 'lib/remotus/ssh_connection.rb', line 49

def port
  @port
end