Close

February 16, 2011

Portable PHP SSH/SFTP Library

We are often times asked to work on clients servers that range greatly in hardware and software platforms. It seems that no two VPS/Cloud servers are configured the same, nor do they have the same user permissions to install/compile modules into PHP/Lamp.

This can be a pain if we need to install a third party module like PHP SSH2 to securely transfer some files between servers for backups.

Along came PHPSecLib!

A beautiful portable SSH/SFTP class that we can use without any compilation or installation of PEAR libraries. The website is extremely well documented and since it is a pure PHP implementation, you can check out the code to get a better sense of what is going on “under the hood”. While we haven’t full tested or used every function/class available in the library, we have used the basic SFTP class frequently and with great success.

For any developer/integrator looking for an easy to use SFTP library, this definetly needs to be in your toolbox.