---

Authenticating in PHP using SSH

[ Thanks to An
Anonymous Reader
for this link. ]

“For a good couple of years now I’ve wondered if there was a way
to write an authentication system in PHP that utilized SSH instead
of the widely-breakable database and flatfile methods. After doing
some research I found its possible after installing a PHP
extension. This guide will detail the methods used to do this, with
the intent of hopefully having this a more versatile option.

:Requirements: Before we begin, there are a few things that are
needed. The first is obviously PHP, with this guide written for
5.3.6. My system has Suhosin already installed and it causes no
issues so you should be fine too if you have those patches
installed. The next thing you’ll need is the PECL extension SSH2.
There other libraries out there that you can use that people have
written but I decided to stick with officially supported
releases.”


Complete Story

Previous article
Next article

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis