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

Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:

Form a inline view based on the results of the previous query?
Hi Experts,
Can we form a inline view on the results of a previous query (another inline view)?

Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

Extra fields in main body and php required.
I'm new to PHP so please be gentle. I have a little php script below that works well.
The &quo

Need help with unexpected T-STRING error
I'm a newbie and I'm still learning PHP. However this error has me stumped. I've googled, searched t

retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th

Internal class functions don't seem to get executed.
Hi. Can someone please put me out of my misery on this. I don't write much PHP and this has me baffl

Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if

Need help with basic sql
Hi,

I am using oracle 10g, and having some small doubts related to sql , here goes the si

Checking if field is empty AND using !is_numeric
Hi lads,

Need to be able to display an error message (using isset?) that says "Cant lea

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