11 lines
454 B
Python
11 lines
454 B
Python
import paramiko
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect("140.44.4.41", username="root", key_filename=r"C:\Users\Snarf\.ssh\id_ed25519_snarfnet", timeout=10)
|
|
|
|
cmd = 'k3s kubectl exec -n dns deploy/pihole -c pihole -- grep -A 10 "Database version is 22" /var/log/pihole/FTL.log'
|
|
stdin, stdout, stderr = client.exec_command(cmd)
|
|
print("Spaceport:\n", stdout.read().decode())
|
|
client.close()
|