Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $main_ip = 'xxx.xxx.xxx.xxx'; // ip of the server2
- $user = 'root';
- $password = 'password'; // root password ot the server2
- $connection = ssh2_connect($main_ip, 22);
- if($connection)
- {
- if(ssh2_auth_password($connection, $user, $password))
- {
- $stream = ssh2_exec($connection, 'printf "n" | pecl install -f ssh2');
- $stream = ssh2_exec($connection, 'printf "n" | pecl install geoip');
- }
- }
- ?>
- #!/bin/bash
- printf "n" | pecl install -f ssh2
Add Comment
Please, Sign In to add comment