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);
Did you know?Explore Trending and Topic pages for more stories like this.
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

Request for tunning the below query
Hi,

Can any one help me on the below query while improving the performance,

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I a

Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup fo

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

need help with php get
i have a option box that gets filled with dates, but how do i get once the option value has been cli

Structure Question - One Table or One Table Per Record Set?
I have a web app (mySQL and PHP) which allows people to create an item with up to 200 records which

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

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