phpseclib vs libssh2

橙三吉。 提交于 2019-12-24 05:00:42

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/4108492/phpseclib-vs-libssh2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!