sshkit v0.3.0 SSHKit.SSH.Connection View Source
Defines a SSHKit.SSH.Connection struct representing a host connection.
A connection struct has the following fields:
host- the name or IP of the remote hostport- the port to connect tooptions- additional connection optionsref- the underlying:sshconnection ref
Link to this section Summary
Functions
Closes an SSH connection.
Opens a connection to an SSH server.
Opens a new connection, based on the parameters of an existing one.
Link to this section Types
Link to this section Functions
Closes an SSH connection.
Returns :ok.
For details, see :ssh.close/1.
Opens a connection to an SSH server.
The following options are allowed:
:timeout: A timeout in ms after which a command is aborted. Defaults to:infinity.:port: The remote-port to connect to. Defaults to 22.:user: The username with which to connect.Defaults to `$LOGNAME` or `$USER` on UNIX, or `$USERNAME` on Windows.:password: The password to login with.:user_interaction: Defaults tofalse.
For a complete list of options and their default values, see:
:ssh.connect/4.
Returns {:ok, conn} on success, {:error, reason} otherwise.
Opens a new connection, based on the parameters of an existing one.
The timeout value of the original connection is discarded. Other connection options are reused and may be overridden.
Uses SSHKit.SSH.open/2.
Returns {:ok, conn} or {:error, reason}.