ssh
- ssh
SSHClient.Close()⇒boolean.Connect(host, port, username, password)⇒boolean.ConnectSSHInfoMode(host, port)⇒HandshakeLog.ConnectWithKey(host, port, username, key)⇒boolean.Run(cmd)⇒string.SetTimeout(sec)
HandshakeLog:object
(ssh).SSHClient
SSHClient is a client for SSH servers. Internally client uses github.com/zmap/zgrab2/lib/ssh driver. Kind: inner class ofssh
SSHClient.Close()⇒boolean.Connect(host, port, username, password)⇒boolean.ConnectSSHInfoMode(host, port)⇒HandshakeLog.ConnectWithKey(host, port, username, key)⇒boolean.Run(cmd)⇒string.SetTimeout(sec)
sshClient.Close() ⇒ boolean
Close closes the SSH connection and destroys the client
Kind: instance method of SSHClientReturns:
boolean - - The success state of the operation.Throws:
error- The error encountered during the operation.
sshClient.Connect(host, port, username, password) ⇒ boolean
Connect tries to connect to provided host and port with provided username and password with ssh.
Kind: instance method of SSHClientReturns:
boolean - - The success state of the operation.Throws:
error- The error encountered during the operation.
Example
sshClient.ConnectSSHInfoMode(host, port) ⇒ HandshakeLog
ConnectSSHInfoMode tries to connect to provided host and port with provided host and port
Kind: instance method of SSHClientReturns:
HandshakeLog - - The HandshakeLog object containing information about the ssh connection.Throws:
error- The error encountered during the operation.
Example
sshClient.ConnectWithKey(host, port, username, key) ⇒ boolean
ConnectWithKey tries to connect to provided host and port with provided username and private_key.
Kind: instance method of SSHClientReturns:
boolean - - The success state of the operation.Throws:
error- The error encountered during the operation.
Example
sshClient.Run(cmd) ⇒ string
Run tries to open a new SSH session, then tries to execute the provided command in said session
Kind: instance method of SSHClientReturns:
string - - The output of the command.Throws:
error- The error encountered during the operation.
Example
sshClient.SetTimeout(sec)
SetTimeout sets the timeout for the SSH connection in seconds Kind: instance method ofSSHClient
Example
(ssh).HandshakeLog : object
HandshakeLog is a struct that contains information about the ssh connection.
Kind: inner typedef of ssh