21 lines
691 B
Python
21 lines
691 B
Python
import paramiko
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect('192.168.100.2', username='mi4', password='m14', look_for_keys=False, allow_agent=False)
|
|
|
|
# List all schedulers with their IDs and disabled status
|
|
stdin, stdout, stderr = client.exec_command('/system scheduler print terse')
|
|
lines = stdout.read().decode().strip().split('\n')
|
|
for line in lines:
|
|
if not line.strip():
|
|
continue
|
|
print(line.strip())
|
|
|
|
print("\n--- Check disabled property differently ---")
|
|
# Try using print with flags
|
|
stdin, stdout, stderr = client.exec_command('/system scheduler print brief')
|
|
print(stdout.read().decode())
|
|
|
|
client.close()
|