.TH ct_ssh 3erl "common_test 1.26.2" "Ericsson AB" "Erlang Module Definition" .SH NAME ct_ssh \- SSH/SFTP client module. .SH DESCRIPTION .LP SSH/SFTP client module\&. .LP This module uses application \fISSH\fR\&, which provides detailed information about, for example, functions, types, and options\&. .LP Argument \fIServer\fR\& in the SFTP functions is only to be used for SFTP sessions that have been started on existing SSH connections (that is, when the original connection type is \fIssh\fR\&)\&. Whenever the connection type is \fIsftp\fR\&, use the SSH connection reference only\&. .LP The following options are valid for specifying an SSH/SFTP connection (that is, can be used as configuration elements): .LP .nf [{ConnType, Addr}, {port, Port}, {user, UserName} {password, Pwd} {user_dir, String} {public_key_alg, PubKeyAlg} {connect_timeout, Timeout} {key_cb, KeyCallbackMod}] .fi .LP \fIConnType = ssh | sftp\fR\&\&. .LP For other types, see \fIssh(3erl)\fR\&\&. .LP All time-out parameters in \fIct_ssh\fR\& functions are values in milliseconds\&. .SH DATA TYPES .nf .B connection() = handle() | target_name() .br .fi .RS .LP For \fItarget_name\fR\&, see module \fIct\fR\&\&. .RE .nf .B handle() = handle() .br .fi .RS .LP Handle for a specific SSH/SFTP connection, see module \fIct\fR\&\&. .RE .nf .B ssh_sftp_return() = term() .br .fi .RS .LP Return value from an \fIssh_sftp\fR\& function\&. .RE .SH EXPORTS .LP .B apread(SSH, Handle, Position, Length) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B apread(SSH, Server, Handle, Position, Length) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B apwrite(SSH, Handle, Position, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B apwrite(SSH, Server, Handle, Position, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B aread(SSH, Handle, Len) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B aread(SSH, Server, Handle, Len) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B awrite(SSH, Handle, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B awrite(SSH, Server, Handle, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B close(SSH, Handle) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B close(SSH, Server, Handle) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B connect(KeyOrName) -> {ok, Handle} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:connect(KeyOrName, host, [])\fR\&\&. .RE .LP .B connect(KeyOrName, ConnType) -> {ok, Handle} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:connect(KeyOrName, ConnType, [])\fR\&\&. .RE .LP .B connect(KeyOrName, ConnType, ExtraOpts) -> {ok, Handle} | {error, Reason} .br .RS .LP Types: .RS 3 KeyOrName = Key | Name .br Key = atom() .br Name = target_name() .br ConnType = ssh | sftp | host .br ExtraOpts = ssh_connect_options() .br Handle = handle() .br Reason = term() .br .RE .RE .RS .LP Opens an SSH or SFTP connection using the information associated with \fIKeyOrName\fR\&\&. .LP If \fIName\fR\& (an alias name for \fIKey\fR\&) is used to identify the connection, this name can be used as connection reference for subsequent calls\&. Only one open connection at a time associated with \fIName\fR\& is possible\&. If \fIKey\fR\& is used, the returned handle must be used for subsequent calls (multiple connections can be opened using the configuration data specified by \fIKey\fR\&)\&. .LP For information on how to create a new \fIName\fR\&, see \fIct:require/2\fR\&\&. .LP For \fItarget_name\fR\&, see module \fIct\fR\&\&. .LP \fIConnType\fR\& always overrides the type specified in the address tuple in the configuration data (and in \fIExtraOpts\fR\&)\&. So it is possible to, for example, open an SFTP connection directly using data originally specifying an SSH connection\&. Value \fIhost\fR\& means that the connection type specified by the host option (either in the configuration data or in \fIExtraOpts\fR\&) is used\&. .LP \fIExtraOpts\fR\& (optional) are extra SSH options to be added to the configuration data for \fIKeyOrName\fR\&\&. The extra options override any existing options with the same key in the configuration data\&. For details on valid SSH options, see application \fISSH\fR\&\&. .RE .LP .B del_dir(SSH, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B del_dir(SSH, Server, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B delete(SSH, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B delete(SSH, Server, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B disconnect(SSH) -> ok | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br Reason = term() .br .RE .RE .RS .LP Closes an SSH/SFTP connection\&. .RE .LP .B exec(SSH, Command) -> {ok, Data} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:exec(SSH, Command, DefaultTimeout)\fR\&\&. .RE .LP .B exec(SSH, Command, Timeout) -> {ok, Data} | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br Command = string() .br Timeout = integer() .br Data = list() .br Reason = term() .br .RE .RE .RS .LP Requests server to perform \fICommand\fR\&\&. A session channel is opened automatically for the request\&. \fIData\fR\& is received from the server as a result of the command\&. .RE .LP .B exec(SSH, ChannelId, Command, Timeout) -> {ok, Data} | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br ChannelId = integer() .br Command = string() .br Timeout = integer() .br Data = list() .br Reason = term() .br .RE .RE .RS .LP Requests server to perform \fICommand\fR\&\&. A previously opened session channel is used for the request\&. \fIData\fR\& is received from the server as a result of the command\&. .RE .LP .B get_file_info(SSH, Handle) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B get_file_info(SSH, Server, Handle) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B list_dir(SSH, Path) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B list_dir(SSH, Server, Path) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B make_dir(SSH, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B make_dir(SSH, Server, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B make_symlink(SSH, Name, Target) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B make_symlink(SSH, Server, Name, Target) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B open(SSH, File, Mode) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B open(SSH, Server, File, Mode) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B opendir(SSH, Path) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B opendir(SSH, Server, Path) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B position(SSH, Handle, Location) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B position(SSH, Server, Handle, Location) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B pread(SSH, Handle, Position, Length) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B pread(SSH, Server, Handle, Position, Length) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B pwrite(SSH, Handle, Position, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B pwrite(SSH, Server, Handle, Position, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read(SSH, Handle, Len) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read(SSH, Server, Handle, Len) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_file(SSH, File) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_file(SSH, Server, File) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_file_info(SSH, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_file_info(SSH, Server, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_link(SSH, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_link(SSH, Server, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_link_info(SSH, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B read_link_info(SSH, Server, Name) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B receive_response(SSH, ChannelId) -> {ok, Data} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:receive_response(SSH, ChannelId, close)\fR\&\&. .RE .LP .B receive_response(SSH, ChannelId, End) -> {ok, Data} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:receive_response(SSH, ChannelId, End, DefaultTimeout)\fR\&\&. .RE .LP .B receive_response(SSH, ChannelId, End, Timeout) -> {ok, Data} | {timeout, Data} | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br ChannelId = integer() .br End = Fun | close | timeout .br Timeout = integer() .br Data = list() .br Reason = term() .br .RE .RE .RS .LP Receives expected data from server on the specified session channel\&. .LP If \fIEnd == close\fR\&, data is returned to the caller when the channel is closed by the server\&. If a time-out occurs before this happens, the function returns \fI{timeout,Data}\fR\& (where \fIData\fR\& is the data received so far)\&. .LP If \fIEnd == timeout\fR\&, a time-out is expected and \fI{ok,Data}\fR\& is returned both in the case of a time-out and when the channel is closed\&. .LP If \fIEnd\fR\& is a fun, this fun is called with one argument, the data value in a received \fIssh_cm\fR\& message (see \fIssh_connection(3erl)\fR\&\&. The fun is to return either \fItrue\fR\& to end the receiving operation (and have the so far collected data returned) or \fIfalse\fR\& to wait for more data from the server\&. Even if a fun is supplied, the function returns immediately if the server closes the channel)\&. .RE .LP .B rename(SSH, OldName, NewName) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B rename(SSH, Server, OldName, NewName) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B send(SSH, ChannelId, Data) -> ok | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:send(SSH, ChannelId, 0, Data, DefaultTimeout)\fR\&\&. .RE .LP .B send(SSH, ChannelId, Data, Timeout) -> ok | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:send(SSH, ChannelId, 0, Data, Timeout)\fR\&\&. .RE .LP .B send(SSH, ChannelId, Type, Data, Timeout) -> ok | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br ChannelId = integer() .br Type = integer() .br Data = list() .br Timeout = integer() .br Reason = term() .br .RE .RE .RS .LP Sends data to server on specified session channel\&. .RE .LP .B send_and_receive(SSH, ChannelId, Data) -> {ok, Data} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:send_and_receive(SSH, ChannelId, Data, close)\fR\&\&. .RE .LP .B send_and_receive(SSH, ChannelId, Data, End) -> {ok, Data} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh;send_and_receive(SSH, ChannelId, 0, Data, End, DefaultTimeout)\fR\&\&. .RE .LP .B send_and_receive(SSH, ChannelId, Data, End, Timeout) -> {ok, Data} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:send_and_receive(SSH, ChannelId, 0, Data, End, Timeout)\fR\&\&. .RE .LP .B send_and_receive(SSH, ChannelId, Type, Data, End, Timeout) -> {ok, Data} | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br ChannelId = integer() .br Type = integer() .br Data = list() .br End = Fun | close | timeout .br Timeout = integer() .br Reason = term() .br .RE .RE .RS .LP Sends data to server on specified session channel and waits to receive the server response\&. .LP For details on argument \fIEnd\fR\&, see \fIct_ssh:receive_response/4\fR\&\&. .RE .LP .B session_close(SSH, ChannelId) -> ok | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br ChannelId = integer() .br Reason = term() .br .RE .RE .RS .LP Closes an SSH session channel\&. .RE .LP .B session_open(SSH) -> {ok, ChannelId} | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:session_open(SSH, DefaultTimeout)\fR\&\&. .RE .LP .B session_open(SSH, Timeout) -> {ok, ChannelId} | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br Timeout = integer() .br ChannelId = integer() .br Reason = term() .br .RE .RE .RS .LP Opens a channel for an SSH session\&. .RE .LP .B sftp_connect(SSH) -> {ok, Server} | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br Server = pid() .br Reason = term() .br .RE .RE .RS .LP Starts an SFTP session on an already existing SSH connection\&. \fIServer\fR\& identifies the new session and must be specified whenever SFTP requests are to be sent\&. .RE .LP .B shell(SSH, ChannelId) -> ok | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:shell(SSH, ChannelId, DefaultTimeout)\fR\&\&. .RE .LP .B shell(SSH, ChannelId, Timeout) -> ok | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br ChannelId = integer() .br Timeout = integer() .br Reason = term() .br .RE .RE .RS .LP Requests that the user default shell (typically defined in \fI/etc/passwd\fR\& in Unix systems) is executed at the server end\&. .RE .LP .B subsystem(SSH, ChannelId, Subsystem) -> Status | {error, Reason} .br .RS .LP Equivalent to \fIct_ssh:subsystem(SSH, ChannelId, Subsystem, DefaultTimeout)\fR\&\&. .RE .LP .B subsystem(SSH, ChannelId, Subsystem, Timeout) -> Status | {error, Reason} .br .RS .LP Types: .RS 3 SSH = connection() .br ChannelId = integer() .br Subsystem = string() .br Timeout = integer() .br Status = success | failure .br Reason = term() .br .RE .RE .RS .LP Sends a request to execute a predefined subsystem\&. .RE .LP .B write(SSH, Handle, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B write(SSH, Server, Handle, Data) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B write_file(SSH, File, Iolist) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B write_file(SSH, Server, File, Iolist) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B write_file_info(SSH, Name, Info) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE .LP .B write_file_info(SSH, Server, Name, Info) -> Result .br .RS .LP Types: .RS 3 SSH = connection() .br Result = ssh_sftp_return() | {error, Reason} .br Reason = term() .br .RE .RE .RS .LP For information and other types, see \fIssh_sftp(3erl)\fR\&\&. .RE