当前位置: 首页 > 工具软件 > libssh > 使用案例 >

libssh2 和 libssh 比较

呼延德华
2023-12-01

SSH连接的第三库,libssh libssh2(curl使用此库) ,两个名字很像但没有任何关系,libssh使用的LGPL 支持sshv1 sshv2 支持开发服务器/客户端. libssh2使用sshv2,支持客户端

 

翻译:

libssh2和libssh都提供了一个API来开发基于SSH的应用程序。

这是尝试对它们之间的差异进行一些说明。

 

libssh2 1.7.0

  • 许可证: 3条款BSD许可证
  • 开发:C(30218 SLOC),sh(1102 SLOC),Perl(65 SLOC),Lisp(33 SLOC),AWK(23 SLOC)
  • NUmber职能:170
  • 密钥交换方法:diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256
  • 主机类型:ssh-rsa,ssh-dss
  • 密码: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,无
  • 压缩方案:zlib,zlib @ openssh.com,无
  • MAC哈希值:hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160(hmac-ripemd160@openssh.com),无
  • 身份验证:无,密码,公钥,基于主机,键盘交互
  • 频道:shell,exec(包括SCP包装器),direct-tcpip,子系统
  • 全局请求:tcpip-forward
  • 频道请求:x11,pty,exit-signal,keepalive @ openssh.com
  • 子系统:sftp(版本3),publickey(版本2)
  • SFTP:statvfs@openssh.com,fstatvfs@openssh.com
  • 线程安全:只是不要同时共享句柄
  • 非阻塞:它既可以用于阻塞,也可以用于非阻塞
  • 您的套接字:应用程序移交套接字,调用select()等。
  • OpenSSL,Libgcrypt或WinCNG(自Windows Vista以来的本机):使用其中任何一个构建

 

libssh 0.7.x

  • 许可证: GNU较宽松通用公共许可证
  • 开发:C(46021 SLOC),C ++(1181 SLOC),sh(186 SLOC),Python(9 SLOC)
  • NUmber职能:213
  • 密钥交换方法:curve25519-sha256@libssh.org,ecdh-sha2-nistp256,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
  • 主机类型:ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,ssh-rsa,ssh-dss
  • 密码:aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc(rijndael-cbc@lysator.liu.se),aes192-cbc,aes128-cbc,3des-cbc,blowfish-cbc,none
  • 压缩方案:zlib,zlib @ openssh.com,无
  • MAC哈希:hmac-sha1,无
  • 身份验证:无,密码,公钥,基于主机,键盘交互式,gssapi-with-mic
  • 频道:shell,exec(包括SCP包装),direct-tcpip,子系统,auth-agent-req@openssh.com
  • 全局请求:tcpip-forward,forwarded-tcpip
  • 频道请求:x11,pty,退出状态,信号,退出信号,keepalive @ openssh.com,auth-agent-req @ openssh.com
  • 子系统:sftp(版本3),OpenSSH扩展
  • SFTP:statvfs@openssh.com,fstatvfs@openssh.com
  • 线程安全:只是不要分享会话
  • 非阻塞:它既可以用于阻塞,也可以用于非阻塞
  • 您的套接字:应用程序移交套接字,或使用libssh套接字
  • OpenSSL或gcrypt:使用其中任何一个构建
  • 客户端和服务器支持
  • SSHv2和SSHv1协议支持
  • 支持Linux,UNIX,BSD,Solaris,OS / 2和Windows
  • 自动测试案例与夜间测试
  • 基于poll(2)或poll(2)-emulation的事件模型。

功能特征

表中的相同数据:

项目libssh2libssh
执照BSDLGPL
服务器端支持没有
GSSAPI身份验证没有
Eliptic曲线密钥交换没有
Eliptic Curve Hostkeys没有
自动测试案例与夜间测试不(可用测试)
稳定的API大多
C兼容性C89C99
严格命名空间
所有功能的手册页没有
所有功能的Doxygen文档没有
教程没有
SSHv1支持没有
建立理念Autotools和CMakeCMake的

 

 

原文:

libssh2 and libssh both provide an API to develop SSH based applications.

Here's an attempt to put some light on the differences between them.

 

libssh2 1.7.0

  • License: 3-clause BSD License
  • Developped in: C (30218 SLOC), sh (1102 SLOC), Perl (65 SLOC), Lisp (33 SLOC), AWK (23 SLOC)
  • NUmber of functions: 170
  • 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.
  • OpenSSL, Libgcrypt or WinCNG (native since Windows Vista): builds with either

 

libssh 0.7.x

  • License: GNU Lesser General Public License
  • Developped in: C (46021 SLOC), C++ (1181 SLOC), sh (186 SLOC), Python (9 SLOC)
  • NUmber of functions: 213
  • Key Exchange Methods: curve25519-sha256@libssh.org, ecdh-sha2-nistp256, diffie-hellman-group1-sha1, diffie-hellman-group14-sha1
  • Hostkey Types: ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-rsa, ssh-dss, 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, none
  • Compression Schemes: zlib, zlib@openssh.com, none
  • MAC hashes: hmac-sha1, none
  • Authentication: none, password, public-key, hostbased, keyboard-interactive, gssapi-with-mic
  • Channels: shell, exec (incl. SCP wrapper), direct-tcpip, subsystem, auth-agent-req@openssh.com
  • Global Requests: tcpip-forward, forwarded-tcpip
  • Channel Requests: x11, pty, exit-status, signal, exit-signal, keepalive@openssh.com, auth-agent-req@openssh.com
  • Subsystems: sftp(version 3), OpenSSH Extensions
  • SFTP: statvfs@openssh.com, fstatvfs@openssh.com
  • Thread-safe: Just don't share sessions
  • Non-blocking: it can be used both blocking and non-blocking
  • Your sockets: the app hands over the socket, or uses libssh sockets
  • OpenSSL or gcrypt: builds with either
  • Client and server support
  • SSHv2 and SSHv1 protocol support
  • Supports Linux, UNIX, BSD, Solaris, OS/2 and Windows
  • Automated test cases with nightly tests
  • Event model based on poll(2), or a poll(2)-emulation.

Feature by feature

The same data, in a table:

itemlibssh2libssh
LicenceBSDLGPL
Server-side supportnoyes
GSSAPI authenticationnoyes
Eliptic Curve Key Exchangenoyes
Eliptic Curve Hostkeysnoyes
Automated test cases with nightly testsno (tests available)yes
Stable APIyesmostly
C compatibilityC89C99
strict namespaceyesyes
man pages for all functionsyesno
Doxygen documentation for all functionsnoyes
Tutorialnoyes
SSHv1 supportnoyes
Build conceptAutotools and CMakeCMake

 

 

 类似资料: