From 84051a76ee4c07f7453ba2bf24fe32c8cf8c7b48 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 26 May 2016 15:33:18 +0200 Subject: ssh: ssh:connect, ssh:shell and ssh_sftp:start_subsystem supports client tcp-socket as input --- lib/ssh/doc/src/ssh.xml | 8 ++++++-- lib/ssh/doc/src/ssh_sftp.xml | 14 +++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'lib/ssh/doc') diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml index ff2d6e082a..bd330e479f 100644 --- a/lib/ssh/doc/src/ssh.xml +++ b/lib/ssh/doc/src/ssh.xml @@ -124,9 +124,11 @@ + connect(TcpSocket, Options) -> + connect(TcpSocket, Options, Timeout) -> connect(Host, Port, Options) -> - connect(Host, Port, Options, Timeout) -> {ok, - ssh_connection_ref()} | {error, Reason} + connect(Host, Port, Options, Timeout) -> + {ok, ssh_connection_ref()} | {error, Reason} Connects to an SSH server. Host = string() @@ -137,6 +139,8 @@ Timeout = infinity | integer() Negotiation time-out in milli-seconds. The default value is infinity. For connection time-out, use option {connect_timeout, timeout()}. + TcpSocket = port() + The socket is supposed to be from gen_tcp:connect with option {active,false}

Connects to an SSH server. No channel is started. This is done diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml index 071d46ec57..67531b7d99 100644 --- a/lib/ssh/doc/src/ssh_sftp.xml +++ b/lib/ssh/doc/src/ssh_sftp.xml @@ -526,16 +526,24 @@ + start_channel(TcpSocket) -> + start_channel(TcpSocket, Options) -> + {ok, Pid, ConnectionRef} | {error, reason()|term()} + start_channel(ConnectionRef) -> - start_channel(ConnectionRef, Options) -> + start_channel(ConnectionRef, Options) -> + {ok, Pid} | {error, reason()|term()} + start_channel(Host, Options) -> - start_channel(Host, Port, Options) -> {ok, Pid} | {ok, Pid, ConnectionRef} | - {error, reason()|term()} + start_channel(Host, Port, Options) -> + {ok, Pid, ConnectionRef} | {error, reason()|term()} Starts an SFTP client. Host = string() ConnectionRef = ssh_connection_ref() Port = integer() + TcpSocket = port() + The socket is supposed to be from gen_tcp:connect with option {active,false} Options = [{Option, Value}] -- cgit v1.2.3