Any ideas how I can use SFTPClient to connect to a remote host using IP, Port, username, password, timeout, and passphrase connection parameters?
Upon successful connection, upload a file to the remote host as well.
I have tried doing this without success
Grateful for any assistance in this regard.
The parameters you listed seem to line up with the ones that
expects; can you provide more specifics on how the connection fails?
Below is the response I get:
** (FunctionClauseError) no function clause matching in :ssh.connect/4
The following arguments were given to :ssh.connect/4:
(ssh 4.10) ssh.erl:158: :ssh.connect/4
(ssh 4.10) ssh_sftp.erl:206: :ssh_sftp.start_channel/3
(sftp_client 1.4.6) lib/sftp_client/operations/connect.ex:139: SFTPClient.Operations.Connect.do_connect/1
(sftp_client 1.4.6) lib/sftp_client/operations/connect.ex:53: SFTPClient.Operations.Connect.connect/1
Connection is as below:
SFTPClient.connect(host: host, port: port, user: user, password: pass, connect_timeout: 50000, operation_timeout: 50000)
Grateful for your response.
documentation for specifies that the second argument should be a
:inet.port_number() - an integer
0..65535. The double-quotes here suggest you are passing a binary instead.
Kindly let me check and try again.