问题描述
在我的项目中,我需要在服务器和多个客户端之间传输文件.客户端和服务器之间的通信应进行加密,应该通过用户名和密码进行身份验证并且该协议应该是一个通用协议,所以我想到了sftp.
In my project i need to transfer files between a server and multiple clients.The communication between client and server should be encrypted,there should be an authentication by username and passwordand the protocol should be a common one, so i thought about sftp.
有两个用于ssh的c/c ++库:libssh和libssh2,其中只有第一个也提供服务器功能.
There are two c/c++ libraries for ssh: libssh and libssh2,where only the first one provides also server functionality.
有一个libssh的API文档,其中的客户端模块,涉及子模块 sftp 的文件已得到充分记录.但是对于服务器 API,我只能找到基本的ssh函数.
There is a API documentation for libssh where the client module,involving the submodule sftp, is well documented.But for the server API I can only find basic ssh functions.
libssh是否完全提供服务器端sftp支持?
Does libssh provide server side sftp support at all?
推荐答案
是的,您可以使用libssh实现sftp服务器.只是没有说明.
Yes, you can implement a sftp server using libssh. It just isn't doucmented.
请参见sftp.h文件末尾的功能:
See the functions at the end of the sftp.h file:
http://git.libssh.org/projects/libssh.git/tree/include/libssh/sftp.h
还有
http://git.libssh.org/projects/libssh.git/tree/src/sftpserver.c
我们将很快发布具有改进的服务器支持的新版本的libssh.
We will soon release a new version of libssh with improved server support.
这篇关于libssh是否支持sftp服务器功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!