Imagine yourself in a scenario where you’re a behind a firewall and cannot access the SSH, or you’re controlling your servers via your mobile. Here’s a quick way to manage your servers through HTTP via command line. You can fire scripts, run shell commands etc.

Be careful, it will not ask you any username/password and runs with username Apache/SYSTEM.

The script is tested over linux and windows servers!

All you need is an Apache server with PHP installed. Just create a PHP file and insert the following code.

Put in a comment if this really helped you!

//— BEGIN OF CODE—-

<html>

<head>

<title>HussuLinux SSH over HTTP…</title>

</head>

<body>

<form id=”form1″ name=”form1″ method=”post” action=””>

<label>Enter Command

<input type=”text” name=”cmd” />

</label>

<input type=”submit” name=”Submit” value=”Submit” />

</form>

Output :

<textarea cols=”100″ rows=”30″>

<?php

$cmd = $_POST[‘cmd’];

if ($cmd==””)

{

//Do Nothing!

}

else

{

echo htmlspecialchars((shell_exec($cmd)));

}

?>

</textarea>

</body>

</html>

//— END OF CODE—–