2011-07-08

erlang에서 sftp 실행하기

application:start(crypto).
application:start(ssh).
{ok, ConnectionRef} = ssh:connect(Host,Port,
              [{silently_accept_hosts, true}, {timeout, Timeout},{user,User},{password,Password}]).
{ok,ChannelPid}=ssh_sftp:start_channel(ConnectionRef).

Data=ssh_sftp:read_file(ChannelPid, File).

댓글 없음:

댓글 쓰기