bakalarska_praca/public/list_users_raspberrypi.py
2023-05-11 21:57:12 +02:00

21 lines
425 B
Python
Executable File

import paramiko
import sys
import warnings
warnings.filterwarnings("ignore", category=ResourceWarning)
command = 'python3 /home/realsense/test/list_users.py'
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('10.8.0.2', username='realsense', password='realsense')
stdin, stdout, stderr = ssh.exec_command(command)
stdin.close()
print(stdout.read().decode())
ssh.close()