Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $connection = ssh2_connect('localhost', 22);
- if (ssh2_auth_password($connection, 'root', 'test')) {
- echo "Authentication Successful!\n";
- } else {
- die('Authentication Failed...');
- }
- $stream = ssh2_exec($connection, "reboot");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment