Re: [PEPr] Comment on Networking::Net_OpenSSH
| From: | Luca Corbo | Date: | Mon, 02 Feb 2009 14:15:55 +0000 |
| Subject: | Re: [PEPr] Comment on Networking::Net_OpenSSH | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51519@lists.php.net to get a copy of this message | ||
On Fri, Jan 30, 2009 at 2:16 PM, Kevin van Zonneveld <kevin@vanzonneveld.net
> wrote:
> On Fri, Jan 30, 2009 at 12:54 PM, Luca Corbo <lucor@php.net> wrote:
> > On Fri, Jan 30, 2009 at 12:39 PM, David Jean Louis <izimobil@gmail.com>
> > wrote:
> >> Luca Corbo a écrit :
> >>> I know about the existence of the ssh2 pecl extension and this package
> want
> >>> to be a simple and out of the box alternative to the libssh bind.
> >>> Some people infact could be not able to compile or install the libssh
> >>> library (i.e. shared host) or simply don't want to install it. On the
> other
> >>> hand it is more simple to have an openssh client configured on your
> host.
> >>> By the way the installation on ubuntu env is quite simple but this
> could
> >>> not be true on other *nix OS (like Solaris, HP-UX ecc.).
>
> Actually, I believe your proposal requires the ability to run shell
> commands.
Yes, you are right.
I don't see why executing 'make' would require something different
> then executing 'ssh'.
IMHO this maybe in some shared environment could not be true. You may be
able to execute commands but you do not have ssh access (i.e. cannot execute
"make" command)
> Some people may find it more difficult. But there are definitively
> ways (to script) around that.
>
> Ubuntu doesn't really have anything to do with it. Basically if you
> can compile something & can get PECL () to work (which is quite
> probable if you're on unix & your are intending to run PEAR anyway),
> you can use libssh2.
>
Yes this is true, but I'm referring to the semplicity, time and skill you
need to perform these steps.
In an ubuntu env you may simply use "apt" and the command resolve all your
dependencies and install all for you. In other environments you could not
have root/sudo privileges or simply a tools such as apt, so you need to
check all dependencies, configure, compile and install all packages
manually. It is only a time question :-).
Note that with libssh2, you can also open an interactive shell (as
> opposed to executing one command & be done with it). If compatibility
> is indeed your aim, then you ought to look into this because most
> routers (e.g. Force10) launch their own CLI as soon as an SSH
> connection is established. And so plain executing something will not
> go through their CLI and hence, not work.
>
> And so the only way to work with such a device would be to
> interactively communicate through this custom shell.
>
Actually the aim of this proposal is to have for all OpenSSH utilities (ssh,
scp, sftp, ecc..) only the implementation of the "exec" functionality.
So a driver based solution would be great, let the end user choose the
> mechanism. But know that if you're indeed planning to implement this
> in a future release, the API will have to undergo some changes
> (ssh_shell is a different approach then ssh_exec) so I wanted to bring
> this to your attention now.
I'm agree with you on the driver based solution. I'll also add the support
to the ssh2 functionality [1] in the future release except for the
ssh_shell.
[1] http://php.net/manual/en/ref.ssh2.php
As a matter of fact, Jaimie Sirovich has left me a message some time
> ago that he was working on a similar class:
> http://www.seoegghead.com/software/ssh2-php-wrappers.seo
> That already tackled some quirks.
>
> I haven't been able to reach him yet but if you're interested I can
> exchange your mail addresses, then maybe you can exchange ideas /
> code.
>
> Let me know. It will be awesome to have something like this in PEAR.
> libssh2 reaching 1.0 (http://sourceforge.net/projects/libssh2/)
> recently, might as well be celebrated with a PEAR package, right? ;)
>
Sure! Any help / comment / idea is always welcome ;-)
Thanks and regards,
Luca
>
> --
> Met vriendelijke groet / Kind regards,
>
> Kevin van Zonneveld
> http://kevin.vanzonneveld.net
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>