c - 如何使用 C 以编程方式 SCP 文件?

标签 c unix sftp scp

在 Unix 环境中使用 C 进行 scpsftp 复制的最佳方法是什么?

我有兴趣了解最好使用的库以及一个示例(如果可能的话)。我正在研究 Solaris服务器与 Sun工具已安装。

最佳答案

尝试Libcurl

libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, > FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, http proxy tunneling and more!

libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...

关于c - 如何使用 C 以编程方式 SCP 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42672/

相关文章:

c# - 使用 WinSCP 对远程 SFTP 文件夹中的文件进行计数

c - 在 Windows 上,_fseeki64 无法正确查找大文件的 SEEK_END

c - 我的循环不会检查 C 中数组的所有元素

c - 为什么下面的函数调用不是线程安全的?

linux - 如何在unix中搜索多个文件中的字符串

python - 在临时文件夹上设置 SFTP 服务器?

bash - 在 Bash 脚本中指定 sftp 的密码

C/OpenGL - 无法独立修改立方体?

linux - 如何使用变量预设启动 shell (fish)

windows - Vim:\n 与\r