Files
SnarfCode/scripts/check_13_boot.py

14 lines
479 B
Python

import paramiko, sys
sys.stdout.reconfigure(encoding='utf-8')
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
ssh.connect('140.44.4.13', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
stdin, stdout, stderr = ssh.exec_command('hostname; uptime; k3s --version')
print("SSH SUCCESS TO .13:\n", stdout.read().decode())
ssh.close()
except Exception as e:
print(f"SSH Failed: {e}")