10 lines
474 B
Python
10 lines
474 B
Python
#!/usr/bin/env python3
|
|
import paramiko, sys
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("108.174.50.68", 22, "root", "Xiao4669805", timeout=30, allow_agent=False, look_for_keys=False)
|
|
i, o, e = c.exec_command("systemctl is-active douyinweb-api; systemctl is-active douyinweb-web", timeout=30)
|
|
print("dy_svc:", o.read().decode().strip().replace("\n", " / "))
|
|
c.close()
|