Guest User

Untitled

a guest
Dec 19th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2. $main_ip = 'xxx.xxx.xxx.xxx'; // ip of the server2
  3. $user = 'root';
  4. $password = 'password'; // root password ot the server2
  5. $connection = ssh2_connect($main_ip, 22);
  6. if($connection)
  7. {
  8. if(ssh2_auth_password($connection, $user, $password))
  9. {
  10. $stream = ssh2_exec($connection, 'printf "n" | pecl install -f ssh2');
  11. $stream = ssh2_exec($connection, 'printf "n" | pecl install geoip');
  12. }
  13. }
  14. ?>
  15.  
  16. #!/bin/bash
  17. printf "n" | pecl install -f ssh2
Add Comment
Please, Sign In to add comment