bakalarska_praca/public/list_users_raspberrypi.py

21 lines
425 B
Python
Raw Normal View History

2023-05-11 19:57:12 +00:00
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()