12 lines
406 B
Python
12 lines
406 B
Python
import paramiko
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect('152.136.232.83', port=22, username='root', password='Jianhua105', timeout=10)
|
|
|
|
stdin, stdout, stderr = client.exec_command("curl -s http://localhost:3002/api/system/config/public", timeout=15)
|
|
out = stdout.read().decode('utf-8', errors='replace').strip()
|
|
print(out)
|
|
|
|
client.close()
|