feat: add various infrastructure check and automation scripts

This commit is contained in:
2026-11-15 17:17:41 -05:00
parent 336b7759d0
commit b301aa3ece
232 changed files with 8274 additions and 298 deletions

View File

@@ -0,0 +1,26 @@
import paramiko
import sys
sys.stdout.reconfigure(encoding='utf-8')
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect('14.4.4.44', username='snarf', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
def run(cmd):
stdin, stdout, stderr = c.exec_command(cmd)
return stdout.read().decode().strip(), stderr.read().decode().strip()
print("--- ping 140.44.4.1 (cluster gateway) ---")
out, _ = run("ping -c 2 140.44.4.1")
print(out)
print("--- ping 1.1.1.1 (internet) ---")
out, _ = run("ping -c 2 1.1.1.1")
print(out)
print("--- default route & ip route show table all ---")
out, _ = run("ip route show table all")
print(out)
c.close()