SFTP Client v1.1.1 SFTPClient.Operations.Connect View Source
A module containing operations to connect to an SSH/SFTP server.
Link to this section Summary
Functions
Connects to an SSH server and opens an SFTP channel.
Connects to an SSH server and opens an SFTP channel. Raises when the connection fails.
Link to this section Functions
Link to this function
connect(config_or_opts)
View Source
connect(config_or_opts)
View Source
connect(SFTPClient.Config.t() | Keyword.t() | %{optional(atom()) => any()}) ::
{:ok, SFTPClient.Conn.t()} | {:error, term()}
connect(SFTPClient.Config.t() | Keyword.t() | %{optional(atom()) => any()}) :: {:ok, SFTPClient.Conn.t()} | {:error, term()}
Connects to an SSH server and opens an SFTP channel.
Options
:host
(required) - The host of the SFTP server.:port
- The port of the SFTP server, defaults to 22.:user
- The user to authenticate as, when omitted tries to determine the current user.:password
- The password for the user.:user_dir
- The directory to read private keys from.:dsa_pass_phrase
- The passphrase for an DSA private key from the specified user dir.:rsa_pass_phrase
- The passphrase for an RSA private key from the specified user dir.:ecdsa_pass_phrase
- The passphrase for an ECDSA private key from the specified user dir.:private_key_path
- The path to the private key to use for authentication.:private_key_pass_phrase
- The passphrase that is used to decrypt the specified private key.:inet
- The IP version to use, either:inet
(default) or:inet6
.:sftp_vsn
- The SFTP version to be used.:connect_timeout
- The connection timeout in milliseconds (defaults to 5000 ms), can be set to:infinity
to disable timeout.
Link to this function
connect!(config_or_opts)
View Source
connect!(config_or_opts)
View Source
connect!(SFTPClient.Config.t() | Keyword.t() | %{optional(atom()) => any()}) ::
SFTPClient.Conn.t() | no_return()
connect!(SFTPClient.Config.t() | Keyword.t() | %{optional(atom()) => any()}) :: SFTPClient.Conn.t() | no_return()
Connects to an SSH server and opens an SFTP channel. Raises when the connection fails.
Options
:host
(required) - The host of the SFTP server.:port
- The port of the SFTP server, defaults to 22.:user
- The user to authenticate as, when omitted tries to determine the current user.:password
- The password for the user.:user_dir
- The directory to read private keys from.:dsa_pass_phrase
- The passphrase for an DSA private key from the specified user dir.:rsa_pass_phrase
- The passphrase for an RSA private key from the specified user dir.:ecdsa_pass_phrase
- The passphrase for an ECDSA private key from the specified user dir.:private_key_path
- The path to the private key to use for authentication.:private_key_pass_phrase
- The passphrase that is used to decrypt the specified private key.:inet
- The IP version to use, either:inet
(default) or:inet6
.:sftp_vsn
- The SFTP version to be used.:connect_timeout
- The connection timeout in milliseconds (defaults to 5000 ms), can be set to:infinity
to disable timeout.