ssh的c语言开发库-libssh2
libssh2是一个C 函数库,用来实现SSH2协议,采用C语言开发并在BSD协议下授权。libssh2 is a client-side C library implementing the SSH2 protocol.
SSH2是一套安全通讯协议框架(早期的SSH1由于存在安全漏洞),基于SSH2协议的产品主要有openssh,putty,SSH Secure Shell Client,XShell等,这些都是开源的,但是这些代码非常难懂而且复杂,不过还好网路上出现了一些开源的SSH2开发库,利用这些开发库开发自己的SSH2程序却要简单得多,由于这些开发库都是开源的,往往是针对linux平台的,而且一般只提供了源代码。同期一款类似产品:libssh,它的授权协议是LGPL的。
Features
Key Exchange Methods: diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha1, diffie-hellman-group-exchange-sha256
Hostkey Types: ssh-rsa, ssh-dss
Ciphers: aes256-ctr, aes192-ctr, aes128-ctr, aes256-cbc (rijndael-cbc@lysator.liu.se), aes192-cbc, aes128-cbc, 3des-cbc, blowfish-cbc, cast128-cbc, arcfour, arcfour128, none
Compression Schemes: zlib, zlib@openssh.com, none
MAC hashes: hmac-sha2-256, hmac-sha2-512, hmac-sha1, hmac-sha1-96, hmac-md5, hmac-md5-96, hmac-ripemd160 (hmac-ripemd160@openssh.com), none
Authentication: none, password, public-key, hostbased, keyboard-interactive
Channels: shell, exec (incl. SCP wrapper), direct-tcpip, subsystem
Global Requests: tcpip-forward
Channel Requests: x11, pty, exit-signal, keepalive@openssh.com
Subsystems: sftp(version 3), publickey(version 2)
SFTP: statvfs@openssh.com, fstatvfs@openssh.com
Thread-safe: just don't share handles simultaneously
Non-blocking: it can be used both blocking and non-blocking
Your sockets: the app hands over the socket, calls select() etc.
Crypto backends: OpenSSL, libgcrypt, mbedTLS or WinCNG (native since Windows Vista): builds with either
最新版本:1.8
官方主页:https://www.libssh2.org/