Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');
- include('Net/SSH2.php');
- $SSH_address = 'ip_address';
- $SSH_port = 'port - not the 22';
- $SSH_username = 'usernmae';
- $SSH_password = 'pass';
- $ssh = new Net_SSH2($SSH_address, $SSH_port);
- $successful_login = $ssh->login($SSH_username, $SSH_password);
- if ($successful_login) {
- echo 'Connected';
- }else{
- echo 'Not Connected';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement