I am trying to write a program that will copy files from a local directory and put them in a directory on a remote server with python. I have looked into the paramiko and and subprocess libraries and none of them seem to work for me. If someone could show me how to do this I would appreciate it. It seems very straight forward but all of the methods I have seen online and on youtube do not work.
This command works for me to manually make the process work. command line command: scp -I ./privatekey //LocalIP/Home/APP/test.csv root@RemoteIP:/root/
Thank you.