Skip to content

Instantly share code, notes, and snippets.

@crcastle
Created August 3, 2011 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crcastle/1124075 to your computer and use it in GitHub Desktop.
Save crcastle/1124075 to your computer and use it in GitHub Desktop.
C4's janky stuff
<?php
require_once("Net/SSH2.php");
$passwd='sup3rs3cr3t';
$user='username';
$server='remoteserver.com';
$ssh = new Net_SSH2($server);
if (!$ssh->login($user, $passwd)) {
exit('Login Failed');
}
$who = $ssh->exec('whoami');
echo $who;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment