import paramiko
import sys
import warnings
warnings.filterwarnings("ignore", category=ResourceWarning)



user_id = sys.argv[1]
input_str = f'{user_id}\n'

command = 'python3 /home/realsense/test/enroll.py ' + input_str

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.write(input_str)
stdin.flush()
stdin.close()

print(stdout.read().decode())


ssh.close()
