iptables-deploy/deploy.py

15 lines
485 B
Python

import paramiko
import json
import os
# import modules
with open("conf.json", "r") as file:
cfg = json.load(file)
# yeah yeah i should probably use YAML but i don't really want to fool with it rn lol -64
sshc = paramiko.client.SSHClient()
sshc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) # so we don't get whined at and crash over a unrecognized host-key
sshc.connect(cfg["server"],port=cfg["port"],password=cfg["ssh-password"])
sshc.exec_command("wall it works!!!")