Guest User

Untitled

a guest
Jan 9th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. <?php
  2. $connection = ssh2_connect('localhost', 22);
  3.  
  4. if (ssh2_auth_password($connection, 'root', 'test')) {
  5. echo "Authentication Successful!\n";
  6. } else {
  7. die('Authentication Failed...');
  8. }
  9. $stream = ssh2_exec($connection, "reboot");
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment