class

Util::SSH

Inherits Util::Shell < Util < Reference < Object

Constants

DEFAULT_COMMAND_TIMEOUT = 30

Default SSH command timeout in seconds

DEFAULT_CONNECT_TIMEOUT = 15

Default SSH connection timeout in seconds

DEFAULT_MAX_ATTEMPTS = 20

Default number of retry attempts

DEFAULT_RETRY_DELAY = 5

Default delay between retries in seconds

Constructors

new(private_ssh_key_path : String, public_ssh_key_path : String = "", prefer_private_ip : Bool = false, user : String = "root")
Source

Class methods

calculate_fingerprint(public_ssh_key_path)
Source

Instance methods

prefer_private_ip
Source
private_ssh_key_path
Source
public_ssh_key_path
Source
run(instance, port, command, use_ssh_agent, print_output = true, disable_log_prefix = false, capture_output = false)

Run a command on a remote instance via SSH

Source
user
Source
wait_for_instance(instance, port, use_ssh_agent, test_command, expected_result, max_attempts : Int32 = DEFAULT_MAX_ATTEMPTS, retry_delay : Time::Span = DEFAULT_RETRY_DELAY.seconds)

Wait for an instance to be ready by repeatedly running a test command until it returns the expected result

Source