class

Shirk::Client

Inherits Reference < Object

High-level SSH client

Constructors

new(host : String, port : Int32 = 22, user : String = ENV["USER"]? || "root", timeout : Int32 = 30, strict_host_key_checking : Bool = false, verbosity : Int32 = 0)
Source

Instance methods

auth_agent

Try to authenticate with SSH agent

Source
auth_methods

Get list of supported authentication methods

Source
auth_password(password : String) : Bool

Authenticate with password

Source
auth_publickey(key_file : String, passphrase : String | Nil = nil) : Bool

Authenticate with public key (file path)

Source
auth_publickey_base64(key_data : String, passphrase : String | Nil = nil) : Bool

Authenticate with public key (base64 key data)

Source
connect

Connect to the SSH server

Source
disconnect

Disconnect from the SSH server

Source
exec(command : String) : ExecResult

Execute a command and return the result

Source
finalize
Source
host
Source
host=(host : String)
Source
port
Source
port=(port : Int32)
Source
strict_host_key_checking
Source
strict_host_key_checking=(strict_host_key_checking : Bool)
Source
timeout
Source
timeout=(timeout : Int32)
Source
user
Source
user=(user : String)
Source
verbosity
Source
verbosity=(verbosity : Int32)
Source