Why doesn't this work? (SSH2)


Posted on 16th Feb 2014 07:03 pm by admin

This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);
ssh2_auth_password($connection, 'root', 'MGdgfskc');

$stream = ssh2_exec($connection, 'useradd -d /home/users/test -m testftp');
$stream = ssh2_exec($connection, 'passwd testftp');
$stream = ssh2_exec($connection, 'password');
$stream = ssh2_exec($connection, 'password');
?>
This is my errors:
Code: Fatal error: Call to undefined function ssh2_connect() in /home/chaosnz/public_html/fotosnap.net/test.php on line 2

No comments posted yet

Your Answer:

Login to answer
285 Like 11 Dislike
Previous forums Next forums
Other forums

Logging and nologging bulk insert
Hi,

oracle version: 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

Table Control
Hi Guru's,

I've created a Module pool program, which contains the Table Control.

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

Parse String
I need to parse the string below into three variables. How would I do that?

john + 10/20/2008

Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

show random images
hey guys

can someone please suggest a way in which the following code can be edited so it onl

help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash