I require a simple script to pass some information to a linux server from a remove php script.
i have created ssh private keys that allow login without a password, and sudo user permitions to allow the command to run.
what i would like is a very basic idea of how to connect and pass a command line via a php script to the linux server.
id like to grab some variables from a mysql database such as username and password as well.
/usr/bin/sudo -u root /usr/sbin/adduser -d /home/usersname -m usersname -p cryptedpassword
where usersname and cryptedpassword are the variables.
can someone point me the right way?