feat: add various infrastructure check and automation scripts
This commit is contained in:
17
scripts/check_ha.py
Normal file
17
scripts/check_ha.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import paramiko
|
||||
import sys
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
try:
|
||||
c.connect('14.4.4.20', username='snarf', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=5)
|
||||
print("Connected to 14.4.4.20")
|
||||
except Exception as e:
|
||||
print("Failed key:", e)
|
||||
try:
|
||||
c.connect('14.4.4.20', username='root', password='dietpi', timeout=5)
|
||||
print("Connected with root/dietpi")
|
||||
except Exception as e2:
|
||||
print("Failed root/dietpi:", e2)
|
||||
|
||||
Reference in New Issue
Block a user