class SSH
- SSH
- Reference
- Object
Overview
SSH client
Defined in:
ssh.crConstructors
Class Method Summary
Instance Method Summary
-
#channel(&)
Open a session channel
- #close : Nil
-
#exec(cmd, &blk : Bytes, Bool -> Nil) : Int32 | Nil
Execute a command on the server, and retrive the stdout/stderr in the block Returns the exit status of the command
-
#exec!(cmd) : Tuple(String, Int32 | Nil)
Execute a command on the server Returns the output of stdout and stderr into a single string and the exit status
- #finalize
- #host : String
- #port : Int32
- #user : String
Constructor Detail
def self.new(host : String, user : String, port : Int32 = 22, socket : TCPSocket = TCPSocket.new(host, port, connect_timeout: 5))
#
Class Method Detail
Instance Method Detail
def exec(cmd, &blk : Bytes, Bool -> Nil) : Int32 | Nil
#
Execute a command on the server, and retrive the stdout/stderr in the block Returns the exit status of the command
def exec!(cmd) : Tuple(String, Int32 | Nil)
#
Execute a command on the server Returns the output of stdout and stderr into a single string and the exit status