Class: MarhanCli::Bash
- Inherits:
-
Object
- Object
- MarhanCli::Bash
- Defined in:
- lib/marhan_cli/apps/bash.rb
Instance Method Summary collapse
Instance Method Details
#ssh_command(param) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/marhan_cli/apps/bash.rb', line 6 def ssh_command(param) raise ArgumentError, "user has to be set" unless param[:user] raise ArgumentError, "host has to be set" unless param[:host] param[:port] ||= "22" return "ssh #{param[:host]} -l #{param[:user]} -p #{param[:port]}" end |