daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Sep 21st, 2016 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');
  2. include('Net/SSH2.php');
  3.  
  4. $server = "mysnmpserver";
  5. $username = "user";
  6. $command = "./test.py";
  7. $pass = "pass";
  8.  
  9. $ssh = new Net_SSH2($server);
  10. if(!$ssh->login($username, $pass)){
  11.     exit('login failed!');
  12. }
  13.  
  14. echo $ssh->exec($command);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top