Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head><title>SSH</title></head>
- <style type="text/css">
- body {font-family:airal , sans-serif , verdana;}
- #ssh-ls {
- width:auto
- white-space: pre;
- position:absolute;
- left:450px;
- letter-spacing:3px;
- word-spacing:inherit;
- }
- </style>
- <body>
- <?php
- include('Net/SSH2.php');
- $user = 'john';
- $password = 123123;
- $ssh = new Net_SSH2('192.168.40.132');
- if (!$ssh->login($user, $password)) {
- exit('Login Failed');
- } else { echo 'hi dude <br />';}
- ?>
- <div id="ssh-ls">
- <?php
- echo $ssh->exec('pwd');
- echo '<br />';
- echo nl2br($ssh->exec('ls -la'));
- echo $ssh->exec('whoami');
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement