Reputation:
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
Reputation:
what i did to fix this was this;
$command = 'useradd ' .$user. ' -p '. $password;
$stream = ssh2_exec($connection, $command);
Upvotes: 1