Class: Phase::Commands::SSH

Inherits:
Command
  • Object
show all
Defined in:
lib/phase/cli/ssh.rb

Direct Known Subclasses

Mosh

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#instance=(value) ⇒ Object

Sets the attribute instance

Parameters:

  • value

    the value to set the attribute instance to.



21
22
23
# File 'lib/phase/cli/ssh.rb', line 21

def instance=(value)
  @instance = value
end

#username=(value) ⇒ Object

Sets the attribute username

Parameters:

  • value

    the value to set the attribute username to.



21
22
23
# File 'lib/phase/cli/ssh.rb', line 21

def username=(value)
  @username = value
end

Instance Method Details

#runObject



23
24
25
26
27
# File 'lib/phase/cli/ssh.rb', line 23

def run
  parse_connection_string
  log "connecting to instance #{ instance.id }..."
  exec "#{ options.conn } #{ username }@#{ instance.dns_name }"
end