import paramiko

HOST = "135.125.102.180"
USER = "ubuntu"
PASS = "BotPascal2026!"

def main():
    try:
        ssh = paramiko.SSHClient()
        ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        ssh.connect(HOST, username=USER, password=PASS)
        
        stdin, stdout, stderr = ssh.exec_command("php -m | grep imap")
        print("IMAP Module check:")
        print(stdout.read().decode())
        
        stdin, stdout, stderr = ssh.exec_command("php -v")
        print("PHP Version:")
        print(stdout.read().decode())
        
        ssh.close()
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    main()
