Python Forum
How to copy files from local system to remote machine?
Thread Rating:
  • 2 Vote(s) - 1.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to copy files from local system to remote machine?
#1
Question 
I am new to Python programming.. Please help me how to approach below requirment.

To copy 5MB of data folder from Local system to the remote machine and execute that file in remote m/c.
Reply
#2
rsync? robocopy?

If you really want to roll your own, you can transfer with ftp, and afterwards login over ssh to execute it.
Reply
#3
Look at FabricParamiko or Ansible,if want Python solutions.
Ansible can be overkill,but if just use Script module it's really nice.
Eg:
- name: Transfer and execute a script.
  hosts: all
  tasks:

     - name: Copy and Execute the script 
       script: /home/user/my_code.py
Reply
#4
Seems interesting, will have a look at it
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run local python script to remote machine without sending krishna1989 1 8,330 Feb-21-2019, 05:18 PM
Last Post: marienbad
  Copy data from 1 blk device in machine A to another blk device in machine B AbhishekV 2 3,421 Feb-01-2018, 11:40 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020