NYCPHP Meetup

NYPHP.org

[nycphp-talk] SSH Login via PHP

NH nhart at musicpf.org
Fri Aug 11 13:15:08 EDT 2006


Thanks Chris & Ben,

I am trying to find out per Zend site whether i5/OS even supports 
libssh(2) as of yet.  Perhaps there should be a future meeting on Zends 
i5/OS implementation of php?  Any takers, Hans?

-Nick



On 8/11/06, Ben Sgro <bens at oddcast.com> wrote:
>> Hello Nick,
>>
>> http://us3.php.net/manual/en/ref.ssh2.php (you may need to tweak by hand for
>> SSH options).
>>
>> It appears PHP.net has a lot of info for ssh:
>> http://us3.php.net/manual/en/function.ssh2-shell.php may work for a CLI php
>> app.
>>
>> How about letting a user upload a new .* file that is created on their
>> locatal machine. Then they can login (w/ssh credentials) through the web
>> based GUI, select the file from an input type=file box and use
>> http://us3.php.net/manual/en/function.ssh2-scp-send.php
>> to send it.
>>
>> There are probably a few solutions, good luck!
>>
>> - Ben
>>     
>
>
> Following up on this, the SSH2 functions are only available if you
> install the beta-grade PECL extension that contains them, and only on
> unix-like systems with libssh2 (that's libssh2-dev for package
> admins):
>
> pecl install channel://pecl.php.net/ssh2-0.10
>
> Basically, you need to know what you're doing at this point to use
> them, but they work and are a good solution to the "web server needs
> to write to files it shouldn't own" problem.
>
>   




More information about the talk mailing list