Computer Science, asked by Fahrezha941, 1 year ago

How to copy a file to a remote server in Python using SCP or SSH?

Answers

Answered by priyanka9432
0
✒If you want the simple approach, this should work.

✨You'll want to ".close()" the file first so you know it's flushed to disk from Python.

✨You need to generate (on the source machine) and install (on the destination machine) an ssh key beforehand so that the scp automatically gets authenticated with your public ssh key (in other words, so your script doesn't ask for a password).

thank u ❤❤✌☺☺
Attachments:
Similar questions