phpseclib 与 libssh2

发布于 2024-09-30 19:11:20 字数 261 浏览 1 评论 0原文

在我的一个项目中,我将使用 PHP 通过 SSH 远程连接许多服务器。 有两种解决方案, phpseclibssh2 PHP 的 PECL 扩展,基于 libssh2 库。

那么有人可以比较一下两者并提及它们的优缺点等吗?

In one of my projects am going to connect with alot of servers remotely through SSH using PHP.
There are two solutions for it, phpseclib and the ssh2 PECL Extension for PHP which is based on the libssh2 library.

So can anyone please compare both and mention their pros and cons etc?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

氛圍 2024-10-07 19:11:20

phpseclib 对服务器的要求几乎为零。只要服务器支持 PHP 就可以工作。相比之下,libssh2 必须安装在服务器上才能工作,而许多服务器没有安装它。如果安装了它,您将不需要包含任何其他文件(而使用 phpseclib 则必须包含它们),但这是一个很大的假设。

总的来说,我认为 phpseclib 的 OOP API 更加直观并且工作更加频繁。

这是批评两者的网站:

http://drupal.org/node/671702

phpseclib has pretty much zero server requirements. So long as the server supports PHP it'll work. libssh2, in contrast, has to be installed on the server for it to work and a lot of servers don't have it installed. If it is installed you're not going to need to include any additional files (whereas with phpseclib you will have to include them) but that's a big if.

Overall, I think phpseclib's OOP API is far more intuitive and works much more frequently.

Here's a website that critics the two:

http://drupal.org/node/671702

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文