import subprocess subprocess.run([ 'sshpass', '-p', 'realsense', 'rsync', '-az', 'realsense@10.8.0.2:/home/realsense/test/pictures/', './images' ])