user4603311
user4603311

Reputation:

putting strings in ssh2_exec

I am having touble with ssh2_exec putting strings in execute.

$stream = ssh2_exec($connection, 'userad '. $user. ' -p  '. $password);
doesnt work



$stream = ssh2_exec($connection, 'userad  user -p  password');
works

Upvotes: 0

Views: 211

Answers (1)

user4603311
user4603311

Reputation:

what i did to fix this was this;

$command = 'useradd ' .$user. ' -p '. $password;
$stream = ssh2_exec($connection, $command);

Upvotes: 1

Related Questions