import paramiko client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect("192.168.1.76", username="root", password="7309208104", look_for_keys=False, allow_agent=False) def run(cmd): _, stdout, stderr = client.exec_command(cmd) out = stdout.read().decode().strip() err = stderr.read().decode().strip() if out: print(out) if err: print(f"[err] {err}") run("find /boot/config/plugins/user.scripts/scripts -maxdepth 2 -type d 2>/dev/null || echo 'NENALEZENO'") run("ls /boot/config/plugins/user.scripts/scripts/ 2>/dev/null || echo 'prazdne nebo neexistuje'") client.close()