Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. <style type="text/css">
  2.  
  3. body {font-family:airal , sans-serif , verdana;}
  4.  
  5. #ssh-ls {
  6.   width:auto
  7.   white-space: pre;
  8.   position:absolute;
  9.   left:450px;
  10.   letter-spacing:3px;
  11.   word-spacing:inherit;
  12. }
  13. </style>
  14. <body>
  15.    
  16. <?php
  17. include('Net/SSH2.php');
  18.  
  19. $user = 'john';
  20. $password = 123123;
  21.  
  22. $ssh = new Net_SSH2('192.168.40.132');
  23. if (!$ssh->login($user, $password)) {
  24.     exit('Login Failed');
  25. } else { echo 'hi dude <br />';}
  26. ?>
  27.  
  28. <div id="ssh-ls">
  29. <?php
  30. echo $ssh->exec('pwd');
  31. echo '<br />';
  32. echo nl2br($ssh->exec('ls -la'));
  33. echo $ssh->exec('whoami');
  34. ?>
  35.  
  36.  
  37. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement