Method: ConfCtl::MachineControl#test_connection

Defined in:
lib/confctl/machine_control.rb

#test_connectionObject

Try to open SSH connection

Raises:

  • (TTY::Command::ExitError)


18
19
20
21
22
23
24
# File 'lib/confctl/machine_control.rb', line 18

def test_connection
  with_ssh_opts(
    '-o', 'ConnectTimeout=3',
    '-o', 'ServerAliveInterval=3',
    '-o', 'ServerAliveCountMax=1'
  ) { uptime }
end