Class: Moonshot::SSHCommand
- Defined in:
- lib/moonshot/ssh_command.rb
Overview
A SSHCommand that is automatically registered with the Moonshot::CommandLine, including options for SSH access.
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Command
Instance Method Details
#parser ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/moonshot/ssh_command.rb', line 9 def parser parser = super parser.on('-l', '--user USER', 'User to log into remote machine as') do |v| Moonshot.config.ssh_config.ssh_user = v end parser.on('-i', '--identity-file FILE', 'SSH Private Key to authenticate with') do |v| Moonshot.config.ssh_config.ssh_identity_file = v end parser.on('-s', '--instance INSTANCE_ID', 'Specific AWS EC2 ID to connect to') do |v| Moonshot.config.ssh_instance = v end parser.on('-c', '--command COMMAND', 'Command to execute on the remote host') do |v| Moonshot.config.ssh_command = v end parser.on('-g', '--auto-scaling-group ASG_NAME', 'The logical ID of the ASG to SSH into, required for multiple stacks') do |v| Moonshot.config.ssh_auto_scaling_group_name = v end end |