| 12345678910 |
- import paramiko
- c=paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- c.connect(hostname="139.159.253.131", username="root", password="bofang666.", timeout=25)
- for cmd in [
- "find / -maxdepth 6 -name 'gogs.log' 2>/dev/null | head -3",
- "ls -la /var/log/gogs* /opt/gogs*/log* 2>/dev/null | head -10",
- ]:
- _,o,e = c.exec_command(cmd, timeout=50)
- print("$", cmd); print(o.read().decode()[:600]); print("---")
- c.close()
|