Advertisement
Guest User

Untitled

a guest
Mar 16th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');
  2. include('Net/SSH2.php');
  3.  
  4. $SSH_address = 'ip_address';
  5. $SSH_port = 'port - not the 22';
  6. $SSH_username = 'usernmae';
  7. $SSH_password = 'pass';
  8.  
  9. $ssh = new Net_SSH2($SSH_address, $SSH_port);
  10. $successful_login = $ssh->login($SSH_username, $SSH_password);
  11. if ($successful_login) {
  12. echo 'Connected';
  13. }else{
  14. echo 'Not Connected';
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement