Connecting to ssh server from php script
On Fri, Nov 23, 2007 at 06:33:32PM +0100, Tobias Nissen wrote:
> Expect does exactly that.
expect is not what am I looking for.
I was not very clear in my original post, sorry.
I have web page on server with php running with safe_mode on.
It has fsockopen() enabled.
With this I can connect to telnet server (or smtp, pop3 ...)
and do what I need to do (write command, read response).
Now I want to connect to ssh server from php script that
is on webserver with safe_mode (no system() call).
I was hoping to do it with something like
$fp = fsockoen("ssl://ssh.example.com", 22, $errno, $errstr, 30);
but it does not open the socket.
My friend bring to my attention that there is module available for
php that has binding to libssh2 library. Module has function
Unfortunately web server I have my pages on does not have this module
enabled and they do not plan to change that. (Also I was not able
to find libssh2 library and its php binding in my etch's DVDs).
Now I have two questions:
a) Is it possible to connect and comunicate with ssh server
b) Does anybody know of some free web hosting service that
has ssh2_exec() function available?
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org