browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

SSH proxy – Running SSH over blocked ports, SSH on mobile phones, SSH over HTTP

Posted by on February 12, 2009

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!

ssh-over-http1

ssh-over-http2

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—–

People who read this article also read these...

    5 Responses to SSH proxy – Running SSH over blocked ports, SSH on mobile phones, SSH over HTTP

    1. Hussain Fakhruddin

      To all the people making silly comments about security loophole:
      Here’s what I have to say

      I suppose & assumed you guys were intelligent. I was a insane & I thought you’d add proper security measures to this mechanism before you set it up. The file is actually useful, but you’d have to be a pretty big douchebag not to think twice before you upload it.

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

      I’d suggest people read first, then snap hysterically if necessary.

      If you want to add some security measure,how long does it take to add a username & password?!

      How about HTTP authentication?! Even Twitter uses it… !!

      Please don’t post such silly comments, they are all gonna be thrashed. Thx!

    2. Arqam

      I use Astrill it blows up the great china firewall :D
      I can access Facebook,Youtube Twitter and almost any site that is blocked :D Hulu.com too :D
      Also they support Iphone/Androids which is a plus point.
      As low as $10.95 a month :D
      its better and reliable than free VPNS !!

    3. iphone 4 kopen

      The touch technology, along with wonderful applications on provide from many an offshore iPhone application specialist makes this gadget the option of millions.

    4. flash erotyka

      Very cool posting :) Thx you very much man.

    5. Shavonne Ditolla

      This site called Unblock Websites also has got some good information on the topic.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Get Adobe Flash playerPlugin by wpburn.com wordpress themes